New York-based charter school operator Democracy Prep has agreed to take over Imagine Southeast, a large public charter elementary school in Ward 8 that narrowly escaped being closed last year for poor academic performance.

Democracy Prep will take responsibility for the school starting this summer and plans to continue Imagine Southeast’s practice of offering single-gender classes, according to a news release issued Thursday afternoon.

Students currently enrolled will be guaranteed the right to stay at the school, which will continue to serve kids in pre-kindergarten through grade six but will be renamed Democracy Prep Congress Heights Public Charter School.

“We are confident that Democracy Prep will create a learning environment where every child has the support needed to succeed,” Barbara J. Bazron, chair of the Imagine Southeast board of trustees, said in a statement.

Democracy Prep built a reputation for lifting test scores among poor children in Harlem and operates nine campuses in New York and New Jersey. Last fall, the organization won approval from the D.C. Public Charter School Board to open a new District school in 2014. Instead, it will undertake the effort to turn around Imagine Southeast, according to spokeswoman Alice Maggin.

“We are thrilled to be given the opportunity to bring the Democracy Prep model of college prep and civic education to our Nation’s capital,” Democracy Prep chief executive Katie Duffy said in a statement.

Imagine Southeast is part of a network run by Arlington-based Imagine Schools, a for-profit company that operates about 70 schools in 12 states and the District, according to its Web site.

The city charter board nearly closed Imagine Southeast at the end of last school year, largely because of its poor math and reading performance. Fewer than 40 percent of students were proficient on D.C. standardized tests.

The school won a one-year reprieve after its trustees, teachers and parents argued that they needed more time to show progress. They agreed to turn operations over if they failed to hit achievement targets by spring 2013.

Instead of improving, the school slid backward, at least according to standardized tests and the charter board’s ratings. Only one-third of students were proficient in math and one-fourth of students were proficient in reading on 2013 city tests.