On Friday morning, Ondřej Malý, a 34-year-old paramedic, received the keys to a two-room apartment in a new building in Nové Dvory, on Prague’s southern edge. He will pay 11,800 koruna a month, about 470 euros, roughly half what the same apartment would cost on the open market. “I have been on a 90-minute commute from Benešov for six years,” he said. “Tonight I will sleep 20 minutes from the station.”

Mr. Malý is one of 142 tenants in the first apartment building the City of Prague has built for rent since the early 1990s, when the post-communist government sold off most of its housing stock to tenants and private buyers. The building, a seven-story block of pale brick beside a new metro station, cost 1.1 billion koruna and was financed by the city’s development company, which was created in 2020 and had, until this week, produced nothing but plans.

“We were told for 30 years that the city should not be in the business of building apartments,” said Kateřina Dvořáková, the deputy mayor for housing, at the opening. “Then the market produced the most expensive housing in Central Europe relative to wages. So we are back in the business.”

Prague’s housing costs are, by most measures, the least affordable in the E.U. after Lisbon. A new 70-square-meter apartment costs about 16 years of the average gross salary, according to the Czech National Bank, and rents rose 48 percent between 2020 and 2026. The city has historically responded with little more than zoning changes; its share of municipally owned housing, at 3 percent, is among the lowest of any European capital, compared with about a quarter in Vienna.

The new building’s tenants were chosen from a list of about 3,900 applicants employed in what the city calls “professions of public interest”: health workers, teachers, police officers, firefighters, and public-transit drivers. Leases run for five years and are renewable as long as the tenant stays in the qualifying job. The city says it has 11 further buildings in design or construction and aims for 2,500 municipal apartments by 2032.

Michal Novotný, an opposition councilor, called the project “a very expensive press conference.” He said the 1.1 billion koruna could have subsidized rent for 1,500 families for a decade. “The city is not a developer,” he said. “It is a slow, expensive developer.” Jana Procházková, an economist at the CERGE-EI institute, said both sides were partly right. “Two thousand five hundred apartments will not move the Prague market,” she said. “What they will do is give the city an asset that lasts 80 years and tenants whose rent does not depend on the next election. Vienna did not become Vienna in six years either.”

Mr. Malý carried a single box upstairs on Friday, a kettle and two mugs. The furniture, he said, would come when he had saved for it. “For the first time,” he said, “that sentence does not sound ridiculous.”