Crown Prince Felipe is the next in line to the Spanish throne

The cartoon on the front page of the weekly satirical magazine El Jueves depicted Prince Felipe saying sex was the closest he would come to working.

It was published after the government announced it would pay couples nearly $3,500 for each new baby born.

The high court judge ruled that the cartoon insulted the royal family.

Possible prison sentence

Judge Juan del Olmo ruled that the cartoon "struck at the honour and dignity of the people represented".

He also ordered the magazine to identify the author of the cartoon.

Slandering or defaming the Spanish royal family carries a two-year prison sentence.

Prince Felipe, 39, married Letizia Ortiz, 34, a former television news presenter, in May 2004.

They have two girls: Leonor, born in October 2005 and Sofia, born in April 2007.