King Juan Carlos of Spain this morning ordered the armed forces to take all necessary measures to crush a revolt by 200 paramilitary civil guards, led by a lieutenant colonel, who had taken over the Cabinet and lower house of parliament, holding hostage 350 deputies, in an attempt to overthrow the civilian government.

At 1.15 a.m. today the King, wearing the uniform of a captain general, went on television - which broadcast through the night instead of closing at the usual midnight - to appeal for serenity and public confidence.

King Juan Carlos said that he had issued orders that all necessary measures should be taken to maintain constitutional order.

"The Crown cannot tolerate in any form any act which tries to interfere with the constitution which has been approved by the Spanish people."

Shortly before the broadcast, the deputy chief of the army, General Alfonso Armada, entered the occupied parliament accompanied by the head of the civil guard and the chief of national police, apparently to negotiate a solution to the parliament siege.

The King ordered junior ministers in the national Cabinet "to constitute themselves into permanent session, to guarantee the governing of the country within civilian rules," after the acting Prime Minister, Mr Adolfo Suarez, members of the Council of Ministers and the leaders of the Opposition Socialist and Communist parties had been held at gunpoint in the Lower House of Parliament.

The attempted coup began when the 200 civil guards, led by Lieutenant-Colonel Antonio Tejero, accompanied Major Ricardo Saenz Ynestrillas, took over the Cabinet and Lower House and told 350 deputies that they were to await news of the installation of a military government.

Colonel Tejero and Major Saenz were found guilty in 1979 of taking part in the right-wing attempt to topple the civilian government - known as Operation Galaxia. Colonel Tejero served one year under house arrest.

The civil guards who were later joined by armed civilians invaded the parliament with a blast of gunfire during the middle of the voting for the new Prime Minister. The conservative UCD candidate, Mr Leopoldo Calvo Sotelo, was to be elected yesterday on the second ballot by a simple majority.

Mr Calvo Sotelo dived under his seat in the chamber.

While the 350 deputies were registering their votes the radio broadcast of their session was suddenly interrupted by gunfire.

National radio almost immediately began playing military music.

Spanish radio said that a man dressed in the uniform of a lieutenant-colonel approached the speaker's stand, waving a pistol, and seconds later a fusillade of shots was heard.

Reporters who fled the building before it was blocked identified the revolt leader as Lt-Col. Tejero.

Colonel Tejero grabbed the microphone and pointed a pistol at Parliament President Landelino Lavilla, while warning the more than 300 members of parliament to fall to the floor.

"Lie down, lie down," Colonel Tejero ordered. Then the shooting at the ceiling began. Amid the dust falling from the broken ceiling deputies tried to find cover. Three shots hit the chamber ceiling and many others lodged in walls and desks.

The Defence Ministry alerted all troops to stay in barracks and said everything was under control and that police surrounded the parliament building.

Two and a half hours after the seizure King Juan Carlos told Catalan President Jordi Pujol by telephone that everything was under control, Europa Press agency said.

A group of onlookers near Parliament started singing the Spanish Fascist song, Cara Al Sol (Face to the Sun), shortly after the civil guards occupied parliament.

Extreme Right-wingers have in the past called for the overthrow of the democratically elected government and the establishment of a military dictatorship.

In Valencia, Right-wing Lieutenant-General Jaime Milans del Bosch declared a state of emergency and took over the military district because of a "vacuum of power" in Madrid.

He said he was awaiting further instruction form King Juan Carlos, commander-in-chief of the armed forces and Head of State.

No other unusual activity was reported in any of Spain's eight other military districts.

The joint chiefs of staff denied the General Bosch had declared a state of emergency in his district. Army, navy and air force spokesmen reported all quiet.

But in a radio broadcast on a Castellon station in his district General Bosch said:

"In view of the happenings taking place in these moments in the capital and the consequent vacuum of power, it is my duty to guarantee order in the military region of my command until I receive corresponding instructions from His Majesty the King."

Radio stations in the Valencia region on the Mediterranean were occupied by the General Bosch's troops, the news agency Europa Press said.

General Milans del Bosch, aged 66, captain-general of the Valencia military region, has never made any secret about his opposition to democracy. Shortly due for retirement, General Bosch was summoned by the King two years ago and sharply reminded of his duty to the state. The general feels no such sense of loyalty to the democratic state.

In his statement read out over Valencia radios, General Bosch banned all strikes and lock-outs and said abandoning work would be considered sedition.

Five and half hours after the civil guards seized parliament army combat cars, mobile anti-aircraft, water cannon, and troop carriers moved into the centre of Valencia, the Spanish news agency, EFE, said. All of them were believed to be under the command of General Bosch.

General Bosch, however, was the only one of nine regional military commanders declaring an emergency.

The two main Socialist and Communist trade unions held an emergency meeting and appealed for calm. They said that the seizure of the Cortes appeared to be an isolated action.

They called on workers to be prepared to act rapidly in defence of democracy if it became necessary. The Interior Minister ordered all provincial civil governors to explain the situation to political and trade union leaders in their regions.

Reporters watching the parliament from the hotel opposite said that units of the civil guard's crack anti-guerrilla squad had also taken up positions outside the occupied building.

Police Jeeps blocked the main access roads to the parliament, which was in darkness apart from a single slit of light from one upstairs window.

Top security chiefs were seen in the hotel but police swarming outside appeared to be waiting for orders.

An EFE report released later said that Colonel Tejero telephoned General Bosch immediately after the takeover of parliament and said:

"My general, no news. All is in order, all is in order." The EFE report said that Colonel then shouted "Long live Spain," as he hung up the phone.

The rebel civil guards, some of them wearing blue denim trousers and carrying machine pistols, took away at gunpoint Mr Adolfo Suarez, the former but still acting prime minister, the leader of the Socialist Opposition , Mr Felipe Gonzalez, the leader of the Communist Party, Mr Santaiago Carrillo, a vice-premier in the outgoing government, Lieutenant-General Gutierrez Mellado, and Mr Agustin Rodriguez Sahagun, outgoing Defence Minister and secretary general of the UCD, as well as Mr Alfonso Guerra, the deputy leader of the Socialist Party. Their whereabouts was still not known.

The rebel civil guards also took over the radio and television communications and held the director general of the state-run television and radio for two hours.