A coup attempt led by a cashiered Army officer collapsed today less than 12 hours after it was launched when military men loyal to the government of Prime Minister Prem Tinsulanonda persuaded the rebels to surrender.

The surrender came after a series of skirmishes in downtown Bangkok in which rebel troops fought loyalist soldiers with tanks, machine guns and mortars. At least four persons, including two members of an NBC Television news team, were killed and 59 were reported wounded.

Neil Davis, 52, an Australian cameraman and correspondent who served as NBC's bureau chief in Bangkok, was killed when rebel tanks opened fire without warning on a radio station where loyalist military forces were broadcasting appeals to soldiers to return to their barracks. William Latch, 35, an American soundman for NBC who was caught in the cross fire with Davis, was seriously wounded and died later in a hospital.

In Washington, White House spokesman Larry Speakes said the United States "regrets the violence that has taken place" and said the Thai government "appears to have the situation under control."

A loyalist military spokesman said the coup attempt was led by Col. Manoon Roopkachorn, 50, a former tank regiment commander who was dismissed from the Army after engineering an abortive coup against the Prem government in April 1981. A member of a group of junior officers known as Thailand's "Young Turks," Manoon apparently still commanded the loyalty of members of his former unit, the 4th Tank Regiment, who spearheaded the coup attempt.

Manoon and his brother, Manas, an Air Force wing commander, gave themselves up late this afternoon after most of their followers obeyed a 3 p.m. surrender deadline, a loyalist spokesman said. The rebel troops abandoned their positions in the Supreme Command headquarters they had captured in a bloodless predawn strike and left tanks they had commandeered sitting in downtown Bangkok's Royal Plaza.

Manoon later left the country on a flight to Singapore, Deputy Defense Minister Paniang Kantarat told reporters. Thai newspapers reported that Manoon was accompanied by Manas and was seen off at the Bangkok airport by senior military officers as part of the surrender deal allowing the brothers to seek asylumn abroad.

After the abortive April 1981 coup, Manoon, who was trained as a battalion commander at Fort Knox, Ky., was dismissed from the Army along with 37 other officers, but receiving no further punishment.

The scene at the Supreme Command headquarters quickly turned into a carnival atmosphere as crowds gathered and children clambered over the tanks. There was no sign of animosity toward the rebel soldiers.

Nor had there been any sign of significant public support for the rebels during the day while they were battling loyalists for control of the government. In most parts of the city Thais went about their business as usual.

In one of a series of broadcasts earlier today, the rebels had said they intended to install a new government that would concentrate on boosting exports and reducing the country's trade deficit.

In the past year, the Prem government has drawn some complaints from the military and sectors of the public for a series of devaluations of the Thai currency, the baht, and an austerity program.

But the Thai economy has been seen as being in relatively good shape compared with other countries in the region and today's coup attempt, like the one in 1981, was seen largely as a simple grab for power.

The coup attempt appeared to catch the government and foreign diplomats by surprise. Unlike previous coups, there had been no hints this time that such an action was brewing.

Initially the rebels identified their leader as retired Gen. Serm Nanakorn, a former supreme commander and deputy prime minister in the late 1970s. The prime minister at that time, Gen. Kriangsak Chomanand, and the deputy Army commander, Gen. Yos Thephasdin, were also named as being among the plotters.

The timing of today's coup attempt appeared to have been determined by the absence of Prime Minister Prem, military Supreme Commander Gen. Arthit Kamlang-ek and members of Thailand's revered royal family.

However, senior military and government leaders gathered at a base on the outskirts of Bangkok to orchestrate resistance to the approximately 400 rebel troops.

Prem returned to Bangkok this evening from Jakarta. State-run radio announced that King Bhumibol Adulyadej and Queen Sirikit, who were visiting southern Thailand, were protected by loyalist military forces and were "in no way under threat" during the "short-lived coup.