MADRID (AP) — Taking the Spanish throne on Thursday, King Felipe VI sought to inspire his beleaguered countrymen amid troubled economic times and lift patriotic spirits a day after the national team's humbling exit from the World Cup.

"We are a great nation. Let us believe and trust in ourselves," Felipe said at his swearing-in ceremony.

Felipe, 46, became monarch after his father Juan Carlos announced his surprise decision to abdicate. The 76-year-old said he was stepping aside after a four-decade reign so younger royal blood could energize the country.

Spain?s King Juan Carlos, left, signs an abdication law in the presence of Queen Sofia, Spain’s Crown Prince Felipe and Princess Letizia  during a
Spain?s King Juan Carlos, left, signs an abdication law in the presence of Queen Sofia, Spain's Crown Prince Felipe and Princess Letizia during a ceremony at the Royal Palace in Madrid, Spain, Wednesday June 18, 2014. Spain?s Juan Carlos formally ratified the law, signing a legislation setting out the legal framework for the handover so his 46-year-old son can be proclaimed King Felipe VI at a ceremony in Parliament on Thursday. The 76-year-old monarch says he wants to step aside after a four-decade reign so that younger royal blood can rally a country beset by economic problems, including an unemployment rate of 25 percent. (AP Photo/Alberto Martin, Pool) (Alberto Martin/AP)

Felipe, and Spain, face plenty of problems. The country is struggling to shrug off a double-dip recession and drive down its 26 percent jobless rate. Scandals have tarnished the royal family and fueled campaigns to abolish the monarchy, while influential groups in some Spanish regions continue to push hard for independence.

Appearing self-assured in a dark military dress uniform, Felipe sought to draw a line under Spain's recent past, promising "a reinvigorated monarchy for new times."

Felipe made clear that he intends to restore public trust in the monarchy.

"Today, more than ever, the people rightly demand our public lives be guided by ... moral and ethical principles," he told lawmakers, who shouted "Viva el Rey (Long live the king)!"

Saying he felt the suffering of those whose living standards were hurt by the economic crisis, Felipe urged Spaniards to shun resignation and unleash their ambitions. He said finding jobs for the unemployed was "a priority for society and the government."

In an oblique reference to separatist groups, Felipe insisted, "We all have our place in this diverse Spain." He ended his speech by saying "thank you" in three regional Spanish languages — Catalan, Basque and Galician — where independence movements are strongest.

A sniper soldier guards from the rooftop before Spain?s newly crowned King Felipe VI arrives at the Parliament in Madrid, Spain, Thursday, June 19, 2014.
A sniper soldier guards from the rooftop before Spain?s newly crowned King Felipe VI arrives at the Parliament in Madrid, Spain, Thursday, June 19, 2014. Crown Prince Felipe ascended to the Spanish throne at midnight Wednesday, but there weren't any ritzy official celebrations. The economic crisis that has left a quarter of Spaniards out of work prompted Europe's newest king to be relatively frugal at his proclamation. (AP Photo/Andres Kudacki) (Andres Kudacki/AP)

Thousands of people lined the streets of Madrid streets as Felipe and Queen Letizia drove from parliament to the royal palace in an open-topped Rolls-Royce, waving to the crowds. The royal couple's daughters, Princesses Leonor, 8, and Sofia, 7, accompanied them for most of the day.

Authorities prohibited a demonstration by groups seeking to abolish the monarchy.

The cheering crowds and pageantry provided a welcome distraction as Spaniards reeled from the embarrassment of the national team's shock defeat by Chile in the World Cup, which ended Spanish hopes of winning a second consecutive title.

Chile’s Felipe Gutierrez watches as Spain’s goalkeeper Iker Casillas and Spain’s Javi Martinez walk together following their loss in the
Chile's Felipe Gutierrez watches as Spain's goalkeeper Iker Casillas and Spain's Javi Martinez walk together following their loss in the group B World Cup soccer match between Spain and Chile at the Maracana Stadium in Rio de Janeiro, Brazil, Wednesday, June 18, 2014. Defending champion Spain was eliminated from the World Cup after losing to Chile 2-0. (AP Photo/Frank Augstein) (Frank Augstein/AP)

Felipe's inaugural speech came at a ceremony in the country's parliament, where the 18th-century Spanish crown and 17th-century scepter were on display. Later, a reception for 2,000 guests at the royal place featured finger foods instead of an elaborate banquet, a deliberately modest touch that acknowledged the financial hardships being endured by many Spaniards.

Juan Carlos, who for most of his reign was held in high esteem for helping steer Spain from a military dictatorship to democracy, drew fierce criticism when he went on a luxurious elephant-hunting safari in Africa two years ago while many Spaniards were losing their jobs.

Spain’s King Juan Carlos, right, hands over his military chief sash to Spain’s newly crowned King Felipe VI during a ceremony at the Zarzuela
Spain's King Juan Carlos, right, hands over his military chief sash to Spain's newly crowned King Felipe VI during a ceremony at the Zarzuela Palace in Madrid, Spain, Thursday, June 19, 2014. Felipe's father Juan Carlos, who reigned during four decades, stepped down after signing an abdication law Wednesday so that younger royal blood can rally a country beset by economic problems, including an unemployment rate of 25 percent. (AP Photo/Zipi, Pool) (Zipi/AP)

In another scandal, Juan Carlos' youngest daughter, Princess Cristina, testified this year in the fraud and money-laundering case engulfing her husband, Inaki Urdangarin.

———

Hatton contributed from Lisbon, Portugal.


Spain’s King Juan Carlos, center, stands before handing over his military chief sash to Spain’s newly crowned King Felipe VI, left, during a
Spain's King Juan Carlos, center, stands before handing over his military chief sash to Spain's newly crowned King Felipe VI, left, during a ceremony at the Zarzuela Palace in Madrid, Spain, Thursday, June 19, 2014. King Felipe VI has taken part in the first official act of his reign, receiving the red sash of Captain General of the Armed Forces from his father Juan Carlos. (AP Photo/Zipi, Pool) (Zipi/AP)