A judge ordered copies of a satirical magazine confiscated Friday for publishing a front-cover cartoon of Spain's Crown Prince Felipe in an intimate bedroom scene with his wife, Princess Letizia, court officials said.

The judge also required publishers of the weekly magazine "El Jueves" to give him the names of the cartoonists, saying their work might amount to libel against the monarchy. Libeling the crown could carry a two-year prison sentence, a National Court spokeswoman said.

El Jueves director Albert Monteys Homer called the order "a direct attack on freedom of expression." The magazine posted its front-cover image on its Web site Friday, accompanied with a brief message saying it did not understand why the court ordered the week's editions pulled.

"We are graphic humorists, and we are conscious of our obligations to what our readers want, which is to explore the limits of freedom of expression," the statement said.

The royal palace said it had no part in asking for the magazine's withdrawal and offered no further comment. Letizia was a Spanish television news anchor before marrying Felipe in 2004.

The cartoon, published Wednesday, pictured the royal couple in an explicit sexual position. It referred to a measure instituted by Prime Minister Jose Luis Rodriguez Zapatero to boost Spain's birth rate by offering $3,450 to families for each new child born or adopted.

In the cartoon, Prince Felipe is saying to his wife: "Do you realize if you get pregnant, this will be the closest to real work I've ever done?"

Judge Juan Del Olmo wrote that the cartoon was "a clearly denigrating act which is objectively defamatory."

It "is a caricature that affects the honor and the intimate nucleus of dignity of the persons represented by it," Del Olmo said. "It could damage the prestige of the Crown."

Media censorship is rare in Spain, though it was often used during the 1939-75 dictatorship of Gen. Francisco Franco. The last publication to be censored was another satirical magazine, El Cocodrilo, in February 1986 for another reference deemed disrespectful to the head of state.

Most of Spain's newspapers and radio stations immediately published news of the ruling — along with the cartoon — on their Web sites. The frenzy was unusual in a country where the royal family is highly respected, and there is an unspoken pact among the media not to damage the image of the monarchs.

"It's been a problem of international media frenzy," El Jueves editor Jose Luis Martin said. "We published on Wednesday morning and nothing happened. On Thursday afternoon, we appeared in a TV program and some ironic comments were made."

During its 30 years of publications, El Jueves has often been critical of Spain's monarchy, and has been asked by the royal household to "reflect" on its contents, the newspaper El Pais reported on its Web site.

Friday's ruling was the third time El Jueves was censored by the judiciary, the newspaper El Mundo said on its Web site.