“I’M GOING to ask him if he has ever taken a selfie and what is his favourite ice-cream,” says Allison Reyes, an eight-year-old at Our Lady Queen of Angels, a Catholic primary school in East Harlem. She is one of six pupils selected to meet Pope Francis when he visits on September 25th. “His visit to the school is like gold,” says Father Joseph Corpora, of the University of Notre Dame’s Alliance for Catholic Education. The pope’s presence should also draw attention to the paradox of Catholic schools: they are both highly successful, and starved of pupils.

Children at Catholic schools do better than the neighbourhood public schools in standardised tests despite spending thousands of dollars less per student. Almost all their pupils graduate from high school and 86% then go on to attend a four-year college. They are especially good at teaching minority children: Catholic-educated black and Latino pupils are more likely to graduate from high school and college. Yet despite their academic success, the number of Catholic primary schools has fallen by half since 1965, when Catholic schools had 6.5m pupils. Today the total is less than 2m, which means a lot of empty desks.

The main reason for the closures is financial. Catholic schools used to be financed by tuition payments, with help from the parish and archdiocese to fill the gaps. But demography has undermined this model. In 1950 76% of all Catholics lived in the north-east and the Midwest, which is where most of the schools are. Today, just under half do. In the south-west Catholics are more plentiful, but they are not sending their children to Catholic schools as European immigrants once did, because those schools do not yet exist.

Schools in the north-east and Midwest have been hit by both declining revenue and rising costs. Many parishes operate at a loss. Paedophilia scandals have added to the financial stress. Twelve dioceses and archdioceses have filed for bankruptcy since 2004. Legal fees and settlements have cost the American Catholic church billions. School buildings are ageing and expensive to maintain. Labour is dear too: half a century ago, 97% of teachers were in holy orders. Today almost all are laymen, who cost more (nuns were not so concerned about pension plans). Catholic schools also face competition from charter schools, some of which even rent space in their empty buildings. Almost all the closed Catholic schools in Detroit are now occupied by charters.

For the past decade, desperate dioceses have been experimenting. Some schools, like Harlem’s Queen of Angels, are no longer part of a parish. Its church closed in 2007 and it is now part of a network of six schools which retains ties with the New York archdiocese but does not receive any money from the church. Kathleen Porter-Magee, the partnership’s superintendent, calls it a 100-year startup. Its purpose has not changed, though—about 70% of pupils receive financial assistance and 89% qualify for free or cheaper lunches. Nearly 70% of the pupils are Latino and 22% are black.

This increased distance between Catholic schools and individual parishes is part of a wider pattern. Some schools have merged, so that multiple parishes support one school. Others have formed groups, sharing administration and finances. Others have sponsors. On September 21st Stephen Schwarzman, boss of Blackstone, a private-equity firm, donated $40m to pay for scholarships to New York’s Catholic schools. In Philadelphia, an independent foundation set up by the archbishop to run many schools has set up scholarships, cut a $6m deficit and centralised administrative functions. Innovation will not reverse the closures, says Sister John Mary Fleming, who heads Catholic education at the US Conference of Catholic Bishops; but it is helping to stabilise Catholic schools.

One solution might be to attract more non-Catholics to these schools. Yet the simplest fix is also the least feasible. “If we could fly schools from Pittsburgh to Brownsville, we’d be in great shape,” says Father Corpora of Notre Dame. Brownsville, a Texan diocese on the border with Mexico, has just 14 Catholic schools and nearly a million Latinos.