For the past decade, while mortgage costs cut into housing starts across the country, vacation homes and high-rise condominiums have continued to spring up along barren stretches of coastline in places like Ogonquit, Maine, and Padre Island, Tex. But not for long, if Congress has its way.

The budget reconciliation bill Congress recently cleared includes an amendment that will effectively prohibit new construction in undeveloped Atlantic and Gulf Coast areas after Oct. 1, 1983. The legislation bars the Federal Insurance Agency (FIA) -- the only insurance office in the nation, private or public, providing flood coverage -- from writing policies in these undeveloped coastal areas after that date.

With no flood coverage available, banks are not expected to make mortgage loans for those easily flooded coastal areas, and private insurers are unlikely to fill the gap. The precise areas affected by the new legislation will be determined in regulations the Interior Department must issue by October, 1982.

There was more than a dash of irony in the congressional action. When lawmakers authorized the National Flood Insurance Program 12 years ago, it was supposed to control construction in areas frequently flooded by streams or storm-driven surf. But critics charge that the program, which has issued 2 million policies on $100 billion worth of property, actually aided resort developers by providing low-cost coverage that was otherwise unobtainable.

"I think the program has been a spur to development in coastal areas, if for no other reason than the availablity of federal flood insurance gives people a sense of security," said Stanley M. Humphries of the Association of State Flood Plain Managers. " . . . Banks have been more willing to make money available."

What went wrong? As the flood program's former acting director Richard Krimm tells it, the program started "with a carrot and a stick. We would make the insurance available to people living in flood plains if their communities would adopt ordinances to minimize flood losses." At the time, 90 percent of the government's $1 billion annual disaster relief payments went for flood losses.

But over the next few years, Congress relaxed enforcement requirements while pushing more communities to participate. More policies were written; more money was paid out. The program's architects had expected some loss for about 40 years while flood-plain housing was replaced or razed. But the loss soon was unexpectedly high: in the first 10 years the FIA paid out $1.1 billion while taking in only $675 million in premiums.

At first, the program required engineers in participating communities to draw detailed maps of flood plains and high-hazard areas. Then local officials had to enforce design controls for new construction in those areas; for example, a building's first floor had to be above the level where there was a good chance of flooding.

The mapping had barely begun when Congress decided to prod more communities to join. In 1969, it enacted an emergency program making communities eligible if they simply drew broad "flood boundary" maps; it also lowered the premium costs. And in 1973 Congress ruled that no federally subsidized mortgage loans could be made in flood-prone communities that didn't participate.

Communities by the thousands signed up -- 17,000, at last count. But many of them still lacked the detailed maps needed to implement construction controls. Sometimes the FIA found itself paying for flood damage to homes only to have the owners rebuild the same structure on the same spot. One group of homes near Conroe, Tex., was flooded 21 times between 1971 and 1979; the FIA covered the losses each time.

The inability to control development was a particular problem in coastal areas. While inland communities started to complete their maps and enforce building standards, engineers on the coast had a far tougher task. Instead of measuring how fast a river rose, they had to compute average wave heights, average tide levels and the effect of storm winds, an expensive job.

Meanwhile, these communities were booming. Housing starts were dropping nationwide, but building accelerated along the Atlantic Coast in places like Hilton Head, S.C., Ocean City, Md., and Atlantic City.

This growth and the lack of controls cost taxpayers millions. In the last three years, insurance policies in coastal zones lost an average of $156 each. In inland areas, losses averaged $212 per policy. (Losses usually run higher in coastal areas, said Don Collins, the program's acting director, but storm damage there was unusually light during the last three years.)

To help cut the losses, program managers recently proposed a 60 percent increase in flood insurance premiums, to take effect Oct. 1 if approved. A second proposal would push premium costs even higher by pegging coastal policy rates to a building's ability to withstand the force of the waves.

Did the program promote the development it was supposed to control? "I don't see the studies that indicate flood insurance is causing development," said Collins. "It may be. But casualty loss write-offs in the income tax code may be one of the causes. Or disaster relief . . . or federal money for roads and sewers and tourism. Or it may be that people just like to live on the beach."