DALLAS — Picture the next major American city to go bankrupt. What springs to mind? Probably not the swagger and sprawl of Dallas.

But there was Dallas’s mayor, Michael S. Rawlings, testifying this month to a state oversight board that his city appeared to be “walking into the fan blades” of municipal bankruptcy.

“It is horribly ironic,” he said.

Indeed. Dallas has the fastest economic growth of the nation’s 13 largest cities. Its streets hum with supersize cars and its skyline bristles with cranes. Its mayor is a former chief executive of Pizza Hut. Hundreds of multinational corporations have chosen Dallas for their headquarters, most recently Jacobs Engineering, which is moving to low-tax Texas from pricey Pasadena, Calif.

But under its glittering surface, Dallas has a problem that could bring it to its knees, and that could be an early test of America’s postelection commitment to safe streets and tax relief: The city’s pension fund for its police officers and firefighters is near collapse and seeking an immense bailout.