BISHOP DOUGLAS MILES of Koinonia Baptist Church, in Baltimore, used to be embarrassed to be a Johns Hopkins alumnus. A girl once stopped talking to him when she found out where he studied. Other residents recall being told by their elders to run past Johns Hopkins in case they were kidnapped by the research hospital for experiments. The university did not help by reneging on promises in the 1950s and 1960s to build new housing for the city. Hundreds of mostly black residents (Baltimore is 63% black) were displaced when the university hospital expanded. The new development was reserved for university staff and students, and then fenced off so that locals could no longer walk on the streets where they once lived. The university became an island and, until fairly recently, its students were advised not to go into certain neighbourhoods.

While Johns Hopkins has thrived, Baltimore has not. Between 2003 and 2014 the city received $2.8 billion in federal aid and another $2.2 billion in state assistance, yet a quarter of the population still lives in poverty. Nearly a third of high-school pupils fail to graduate on time. On August 10th the Department of Justice (DOJ) found that the city’s police department engaged in unconstitutional practices, including disproportionate rates of stops, frisks and arrests of black Baltimoreans, and used excessive force against minors and the mentally ill. One black man in his mid-50s was stopped 30 times in less than four years on suspicion of loitering. The DOJ found that people were publicly strip-searched during traffic stops and that police retaliated when civilians complained.

Yet the relationship between the university and its host city has changed. Johns Hopkins is the biggest private employer in Baltimore. And Ron Daniels, the university’s president since 2009, has assumed the kind of responsibility for the rest of the city more often associated with a government than with a private institution.

The university has promised to increase its use of local and minority-owned construction businesses, to favour hiring local residents, especially those from distressed communities, and to use local vendors. It has encouraged more than two dozen other Baltimore companies, including BGE, a large regional utility, which already relies on local suppliers, to do the same. Tim Regan, the head of Whiting-Turner a large construction firm which signed up, says that Mr Daniels has tremendous power as a convener. In April the companies he recruited pledged $69m over three years, kick-starting what Bishop Miles calls “the most significant economic and jobs initiative in the life of the city”.

Johns Hopkins is helping to finish a long-delayed development on 88 acres (36 hectares) near the hospital; it is also overhauling the curriculum at nearby schools to emphasise science, maths and engineering. In May the university began working with the city’s health department to help provide glasses for school-age children. Extra screening is now done immediately, and children can pick their frames in a “vision van” parked outside their school. Johns Hopkins is not only a fund-raiser for the programme; it will also evaluate it, to make sure it is working as it should.

The university’s Bloomberg School of Public Health works with the city’s police department. Daniel Webster, who heads its work on guns, has a project that crunches data to help study and reduce violent crime. He and Kevin Davis, the new police chief, who took over from Anthony Batts when Mr Batts, who was fired after the unrest in the city last year, are working together, getting officers to walk the beat and to focus on the worst offenders. The university is also helping to improve recruitment.

All this will test the limits of what a university which excels at solving theoretical problems can do for a place marked by boarded-up houses and mistrust. Mr Daniels is undeterred. “So goes Baltimore, so goes Hopkins,” he likes to say.