Princess Leonor, the heir to the Spanish throne, is gearing up to undergo three years of military training starting in August.

The announcement was made on Tuesday by Spanish Defense Minister Margarita Robles.

"As in all parliamentary monarchies, [the heir] has to have a military background and a military career," said Robles after a cabinet meeting, as reported by Reuters.

A close-up of Princess Leonor of Spain wearing a wine hue turtleneck sweater

Crown Princess Leonor of Spain, 17, is the heir to the throne. (Carlos Alvarez/Getty Images)

"In due course, the commander in chief of the armed forces will be a woman, and in recent years we have been making a very important effort to incorporate women into the armed forces," Robles shared.

According to the outlet, the 17-year-old will receive her first year of training at the Army Military Academy in Zaragoza. She will then head to a naval school, where she’ll sail the Juan Sebastian Elcano training tall ship. She’ll then conclude her studies at the General Air Academy.

Both the government and the royal house said Leonor’s "very intense" military training will precede her university studies. She’ll be following in the footsteps of her father, King Felipe VI.

QUEEN LETIZIA OF SPAIN SHOWS OFF HER ABS IN DARING CUTOUT HOT PINK DRESS

Princess Leonor of Spain applauding alongside her father the king

Princess Leonor of Spain is following in the footsteps of her father, King Felipe VI. (Carlos Alvarez/Getty Images)

At age 15, the princess presided over her first public event without the presence of her father, 55. She attended the 30th-anniversary celebration of a language and cultural center. Leonor was accompanied by Deputy Prime Minister Carmen Calvo at the Cervantes Institute’s headquarters in Madrid. The institute director, Luis García Montero, also accompanied the princess.

During her visit, Leonor deposited a copy of Spain’s Constitution and Miguel de Cervantes’ classic "Don Quixote" in the institute’s literary vault, where it stores Spanish-language literary treasures.

The Cervantes Institute promotes the learning of the Spanish language and literature around the world.

Princess Leonor of Spain waving outdoors with her sister and her parents, including the king

In this 2019 photo, King Felipe VI is seen with his wife, Queen Letizia, and their daughters, from left, Princess Leonor and Princess Sofia at Palma de Mallorca, Spain.  (Europa Press Entertainment/Europa Press via Getty Images)

At the time, the royal house announced that Leonor would complete her last two years of high school at a boarding school in Wales.

The Spanish monarchy has faced intense scrutiny in recent years. The king’s father, Juan Carlos I, abdicated the throne in 2014 amid a tax fraud case involving members of the royal family. At the time, Spain was suffering from a deep recession. The 85-year-old also faced backlash over an elephant-hunting trip in Africa.

The former monarch has been living in Abu Dhabi since 2020. That year, his ex-mistress Corinna zu Sayn-Wittgenstein came forward in True Royalty TV’s original documentary, "The Rise and Fall of the Spanish King," which featured her first on-camera interview detailing her relationship with the fallen royal.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Spain's former King Juan Carlos I (C) is welcomed by Member of the French academy

Spain's former King Juan Carlos I has been living in Abu Dhabi since 2020. (Emmanuel Dunand/AFP via Getty Images)

KING JUAN CARLOS’ EX-MISTRESS WAS INITIALLY ‘AFRAID OF THE RETALIATION SHE WOULD FACE’ FOR SPEAKING OUT: DOC

Juan Carlos made his exit after several investigations were opened in Spain and Switzerland concerning alleged fraud. The investigations have since been dropped. He briefly reunited with his family in May.

The Associated Press contributed to this report.