A Spanish judge has ordered the king's sister, Princess Cristina, to be tried along with her husband on charges of tax fraud.

The ruling makes her the first member of the country's royal family to face charges in court since the royalty was restored in 1975.

In issuing the indictment, Judge Jose Castro went against a prosecutor's December 9 recommendation that Cristina should be fined and only her husband, Olympic handball medallist-turned-businessman Inaki Urdangarin, be tried.

If convicted, Cristina could face up to four years in prison.

Suspected abuse of company funds to cover the couple's expenses at their Barcelona home is among evidence Judge Castro has compiled about Aizoon, a property and consulting firm Cristina co-owned with her husband.

The legal troubles of King Felipe VI's sister during a four-year probe have damaged the Spanish monarchy's image.

The case centres on allegations that Urdangarin used his Duke of Palma title to embezzle about six million euro (£4.7 million) in public contracts through the Noos Institute, a non-profit foundation he set up with a business partner that channelled money to other businesses, including Aizoon.

Cristina's lawyers have said she is innocent.

Prosecutor Pedro Horrach recommended charges for Urdangarin carrying a possible sentence of 19-and-a-half years in prison while saying Cristina should not be indicted but forced to pay 580,000 euro (£455,000) to cover the amount she could have profited from because of her husband's alleged illegal dealings.

Judge Castro had the option of accepting Mr Horrach's recommendations or sending Cristina to be tried by a different judge.

Cristina's brother Felipe, 46, became king in June when his father Juan Carlos abdicated after a four-decade reign.

Felipe pledged to restore public trust in the monarchy and ordered a palace reshuffle, meaning that Cristina and her sister, Princess Elena, are no longer official members of the royal family.

The judge set bail for 49-year-old Cristina at 2.7 million euro (£2.1 million) and 15 million euro (£11.7 million) for her husband.

The case will probably go to trial at the end of 2015 in Palma de Mallorca in Spain's Balearic Islands, where most of the alleged offences occurred.

Cristina denied knowledge of her husband's activities in February during an unprecedented appearance before Judge Castro to answer his questions.

She and her husband moved to Switzerland in 2013, where she works for the foundation of Spain's La Caixa bank, which finances a variety of programmes to help the needy and promote culture.

Cristina's lawyer, Miguel Roca, told reporters he would appeal against the decision.

"It's a surprise to all of us and especially her," he said.

Probing suspected abuse of company funds to cover the couple's expenses from Aizoon, Judge Castro compiled detailed lists of alleged examples - including purchases for their Barcelona mansion, salsa dancing classes and holidays at luxury hotels.

Cristina's case is going forward because Spanish law allows groups to file charges when officials do not. Her case was driven forward by the anti-corruption group Manos Limpias (Clean Hands).

Polls have shown that Felipe is Spain's most popular public figure. But his efforts to restore credibility to the monarchy could be undercut by his sister's legal troubles and a high probability she will end up on trial along with 15 others accused of participating in the scheme.

"She is probably going to trial and it will be totally public. Everyone will be able to see it," said Ignacio Sanchez, a Madrid-based lawyer for Hogan Lovells International who specialises in white collar crime and fraud. "This was the worst news she could have received."