In April, Cynthia Rosario picked up a copy of the New York Times Magazine and began reading its cover story, which chronicled the challenges of a South Bronx middle school and its driven principal.

The story talked about M.S. 223’s rising test scores, its extraordinarily challenging students, and how its staff of young, but committed teachers was steadily improving. But all that progress was threatened, the school’s principal Ramon Gonzalez believed, by the city’s plans to open a charter school in the building next year. His building was already nearing capacity and handing the remaining space to a new school would jeopardize his plan to expand into a high school.

“I kept reading thinking, ‘Oh no,'” Rosario said, just waiting to see her school’s name mentioned in the role of the villain.

A year ago, when Rosario applied to open a charter school in the South Bronx, she entered the city’s opaque space-search process, which nearly pitted her against a high-quality school. When she began, she never imagined the city’s Department of Education would look to a school like M.S. 223 for space.

Located in District 7, which has become a hot-spot for new charter schools to open, M.S. 223 and the school it shares a building with, South Bronx Preparatory, are both A-rated schools. They were opened under former Chancellor Joel Klein to replace middle school 149, which was known as a chaotic place to work and learn, and were intended to offer parents better options within their own neighborhood.

Rosario assumed the city would place her school, Heketi Community Charter School, in a building where the other schools weren’t faring as well. Gonzalez had the same thought.

“There are three, maybe four middle schools in our district with their heads above water,” Gonzalez told the Times reporter. “How are you not closing one of the failing schools and putting the charter there?”

But in April, when Rosario saw the story about M.S. 223, she realized she’d almost been offered space there.

“I didn’t want to be part of a system that does this to a dedicated principal,” she said. “If I would have known that this was a successful school and it was looking to expand, I would never have considered it. But who knew?”

Throughout the space-finding process, Department of Education officials did not tell Rosario which school in the South Bronx they were considering for her school. In January of this year, she got a phone call from Department of Education officials saying they might have room for her in a public middle school in District 7. They’d have to measure the space first, they told her, and weren’t making any promises. Rosario was hopeful. Space in a public school would mean being able to put more money into classrooms and teachers rather than rent.

In February, DOE space planners showed up at M.S. 223. Both Gonzalez and South Bronx Prep’s Principal Ellen Flanagan were told that an elementary charter school was likely coming in, but they weren’t told which one. Gonzalez and parents at his school got working. They sent DOE officials an email saying that other middle schools in the district had more space to offer and opening a charter school in their building would prevent them from expanding their school, as they planned to do.

Department of Education officials will not say whether Heketi was one of the charter schools they considered putting in M.S. 223’s building — the process is supposed to be confidential, with neither the charter school, nor the host schools knowing until the late spring. But process of elimination makes it clear that Heketi was one of the schools slated for that space.

Four elementary charter schools were approved to open in District 7 next fall. One never sought public space and planned all along to find a private building. Another decided by mid-January to find space in Brooklyn instead. That leaves two schools: Boys Preparatory Charter School, which is part of the growing Public Prep Network, and Rosario’s school Heketi.

Rosario, the two principals in the J.H.S. 149 building, and other sources close to the situation had all heard that Heketi was the school the DOE intended for the space.

A few months later, department officials called Rosario back. The space they’d found in a middle school wasn’t going to work out, they told her, nor would a smaller space they were looking at in another part of the Bronx. She’d have to find private space if she wanted to open next September. After finding a private school in District 7 with space to rent, and nearly signing a lease, the deal fell through. Rosario was left with no choice but to postpone opening her school until 2012.

“That was the hardest part,” Rosario said. “We had 313 applications. It was hard to disappoint all those families.”

Had the DOE decided to push ahead and place Heketi in M.S. 223’s building, Rosario and Gonzalez would have been thrust into an awkward situation.

Gonzalez would have been forced to fight off an independent charter school run by a Bronx-native who’d attended public schools as a child, not the fourth or fifth branch of a charter network like KIPP or Achievement First, which tend to garner less sympathy given their size and resources. And Rosario would have been offered the chance to open in public space, but only by taking away classrooms from a school she admires.

The two school leaders are natural allies.

Gonzalez grew up in East Harlem, where he attended public schools for most of his early education and then returned, post-college, and opened his own. His idea was to provide the kind of rigorous middle school — and eventually high school— he’d want to send his own children to, but didn’t necessarily have himself.

Rosario’s plan is to do the same in 2012 when she finds private space. As a child, she attended a Bronx public school that was experimenting with bilingual education, and not all that successfully. By the middle of third grade, when her parents pulled her out of the bilingual classes, she barely knew any English. With her school, she hopes to give students who don’t speak English at home the education she didn’t have.

“I think a lot of what he’s doing is very aligned with us philosophically,” Rosario said. “It’s just frustrating that these district policies pit committed educators against each other as enemies. We’re collaborative in nature.”