YOGYAKARTA, Indonesia — Religious tradition runs deep in this ancient city in the heart of Indonesia.

The country’s oldest Islamic university and one of its most influential Muslim charities are here. In the city center, an ornate 18th century palace complex is home to one of the world’s last surviving Muslim dynasties. Even health care is often linked to religion; several of Yogyakarta’s leading medical centers are operated by Islamic charities.

Yet religious hospitals and clinics in Indonesia, the world’s most populous Muslim-majority country, do something that many religiously affiliated medical providers in the United States do not. They dispense contraceptives, including IUDs, birth control pills and condoms. Some perform sterilizations.

In the U.S., many religious institutions are locked in a fight with the federal government over birth control that is due to go before the Supreme Court next month. Elsewhere, in contrast, religious groups are increasingly joining governments and health officials in a global effort to expand access to birth control.

Last week, even Pope Francis connected family planning and health, saying contraceptives could be used to prevent pregnancies in places where the Zika virus, which has been linked to birth defects across Latin America, is spreading.

“Anything related to sex is controversial or uncomfortable, but with maternal and child mortality still so high in many parts of the world, people have become much more willing to work on this issue,” said Mona Bormet, program director for Christian Connections for International Health, a U.S.-based consortium of Christian aid organizations. “The unmet need is just huge.”

The health needs are driving a revolution worldwide in family planning.

World Vision, a multibillion-dollar evangelical Christian aid group based in Southern California, is helping governments ensure dependable supplies of contraceptives.

In West Africa, Muslim, Catholic and Protestant leaders recently formed a partnership to exchange information on promoting family planning in their religious communities.

In Indonesia, a group of Muslim scholars has endorsed vasectomies as a form of birth control.