Cecelia Blalock, right, communications director for Community Academy public charter school, talks in January to prospective parent Lourdes Martinez, who is looking for a pre-K for her daughter. (Sarah L. Voisin/The Washington Post)

District officials released the results of the city’s school enrollment lottery late Sunday night, capping one of most anxiety-ridden times of year for thousands of parents who have been hoping to be lucky enough to get their children into a good school.

About 71 percent of students got one of their choices, according to data that Deputy Mayor for Education Abigail Smith released Monday. Of those students, 85 percent got one of their top three choices.

“I’m happy,” said Tekia Harrod, a mother from Southeast Washington whose 3-year-old daughter got into her first choice, Friendship Public Charter School’s Southeast Elementary Academy. “I do a lot of praying,” Harrod said, explaining her good fortune.

More than 17,000 students entered the lottery, which for the first time this year included all traditional schools and most charter schools. Parents were allowed to rank up to 12 schools in order of preference, and a computer algorithm — similar to the algorithm used to match doctors-in-training to medical residencies — matched children to open spots.

About 5,000 students were not matched to any school, and the city did not release data showing the number of students who secured spots at last-choice schools. For many of those families, lottery day was a heartbreak and a difficult reminder that while the city’s public education options are improving, there are still far too few well-regarded schools to meet demand.

“You are gambling on your child’s education,” said Chai Shenoy, a Takoma mother whose daughter got a spot in one of her last choices for a preschool program. Shenoy said D.C. policymakers need to treat school improvement as a key part of the city’s economic development and to realize that for many families, it is tempting to leave the city and all its uncertainty about schools for the stability of the suburbs.

“Those are conversations that all of my friends who live in D.C. are having with each other,” Shenoy said. “And nobody wants to leave D.C.”

Each of the District’s dozens of charter schools used to conduct its own lottery, and traditional schools previously had a separate lottery for students seeking preschool and out-of-boundary seats. That was daunting for parents and — because children could be admitted to more than one school and could hold onto multiple seats for months — contributed to an annual wait-list shuffle that stretched into October.

The new unified lottery is meant to streamline the application process for parents and cut down on the wait-list shuffle by admitting each child to only one school. But it does not fix the fact that there are too few schools with the programs that meet parents’ demands.

Some of the most sought-after schools have acceptance rates that rival the nation’s most selective colleges. Two Rivers, an elementary-middle school in the Noma neighborhood, received nearly 2,500 lottery applications for 60 seats — giving families about a 2.5 percent chance of getting in — while KIPP DC had about 6,540 applications for about 1,100 seats, according to Scott Pearson, executive director of the D.C. Public Charter School Board.

AppleTree Early Learning, a network of six early-childhood charter school campuses across the city, received 1,947 applications for 304 spots. “We’re pleased that we’re a popular choice,” said AppleTree President Jack McCarthy, but “the real tragedy here is that we’ve got to have lotteries because there’s a shortage of good schools.”

Smith said she was pleased that the new system operated smoothly and that community outreach efforts appear to have been successful: Lottery participation rates in the city’s eight wards are similar to the proportion of students in each ward. But she acknowledged that there are still many children who didn’t get a seat.

“People will be thrilled with the process if they get what they wanted, and if they are disappointed, they will have a very different lens through which they’re looking at the process,” she said.

Starting in kindergarten, D.C. residents have a right to attend their assigned neighborhood school without entering the lottery. But children are not guaranteed a seat before kindergarten, so preschoolers who don’t match a school are not guaranteed admission anywhere. Of the 3-year-olds who entered the lottery, 88 percent found a match.

Families admitted to a school must submit enrollment paperwork by May 1 to secure their seats. Those who don’t get admitted anywhere, or who did not complete an application earlier this year, can apply for the lottery’s second round by May 15. The second round allows schools to fill seats that are still open or add to their waiting lists.

Students still have a chance to be admitted to schools where they have been wait-listed, though because it is a new system, it is hard to say how many spots will open up.

In the past, the charter board published information about the length of wait lists at each charter and the traditional school system published more detailed information about who applied to, got into and got wait-listed at each school.

But this year, Smith’s office has not released that information, and parents only know their child’s wait-list number. That has led to frustration among families who are trying to understand the likelihood of getting into a better city school. Smith said she plans to release more data, but did not offer specifics or a timeline.

“Having data to be able to evaluate your chances is really important for people,” said Susanna Montezemolo, an Adams Morgan mother whose daughter was admitted to preschool at their neighborhood school — their 10th choice.

Montezemolo, whose daughter is 390th on the wait list at her top-choice school, said she feels strongly that the unified lottery is better than the old system.

“I feel like I got burned in this lottery, but I still think this is the best way to do it,” she said. “I think the sad thing is . . . there is just a real scarcity of high-quality seats in the city.”