Preserving safety and modesty are the reasons, said Joe Aponick, communications director for the Diocese of Harrisburg.

The mandatory policy, first reported on Tuesday by WITF, National Public Radio’s Harrisburg station, also bans girls from participating on Catholic school tackle football and rugby teams.

“The diocese therefore believes that it is incompatible with its religious mission and with its efforts to teach Gospel values to condone competitions between young men and women in sports that involve substantial and potentially immodest physical contact,” said Bishop Ronald W. Gainer of Harrisburg in a letter to students.

Kenneth A. Gavin, director of communications for the Archdiocese of Philadelphia, said the policy applies to all Catholic school students in Pennsylvania. It would not apply to Catholic university students.

Under the policy, which took effect July 1, a male wrestler would either have to forfeit his match with a girl, or his team would have to persuade the other school to withdraw the girl and replace her with a boy.

The bishops will not require football and rugby teams to forfeit if the opposing team included a girl.

Mark E. Byers, chief operating officer for the Pennsylvania Interscholastic Athletic Association, said he was aware of the new Catholic policy and that it did not violate any of the group’s regulations.

Few girls participate on boys wrestling teams in Pennsylvania. The National Wrestling Coaches Association lists the state as having no female wrestlers, but Byers believes 30 or more girls may wrestle in Pennsylvania.

Texas leads the nation with some 2,700 high school girls involved in wrestling, while California has just over 2,000, according to the coaches association.

In 2013, a 12-year-old girl, Audriana Beattie, sued Pennsylvania’s Line Mountain School District in federal court and won the right to participate on the boys wrestling team of her junior high school.

Brad Skelton, Line Mountain athletic director, said Beattie wrestled once in a match last season against Shikellamy Middle School in Sunbury. “Nobody forfeited,” he said.