YORK, Pa. (AP) _ Four Tanzanian youths who were jailed after they walked away from an international scouting event should be freed, a judge has ruled.

The youths, ages 15 to 17, are now seeking asylum in the United States, saying they fear the media attention surrounding their case might result in persecution if they return home.

Judge Walter Durling ruled last week that the youths, who were attending the international Boy Scout Jamboree near Fredericksburg, Va., are here legally because they hold tourist visas valid until Jan. 22.

Durling said the boys broke no laws when they walked away from the jamboree July 29 and hitchhiked 80 miles to Washington, D.C.

They have been held at an Immigration and Naturalization Service juvenile detention facility in York since Aug. 2. INS, which is seeking to deport the youths, is appealing the judge's ruling.

``Our position is that federal law clearly states that if a person enters on one type of visa, and demonstrates that their intent is to perform a different type of activity than what they entered the country for, then they have broken the law,'' INS spokesman Russ Bergeron said.

Steven Schulman, a Washington attorney representing the boys, said negotiations to resolve the case have been unsuccessful. He said INS has rebuffed his request that the boys be put in foster homes instead of the detention center.

``The INS has basically told us that if the kids don't agree to go home immediately, they should plan to be there for a very long time,'' Schulman said.

Tanzanian officials, who paid for the trip, have asked that the boys be sent home.