ROME -- An unemployed bricklayer shot two Italian policemen in a crowded square outside the premier's office Sunday just as the nation's new government was being sworn in, investigators said.

The gunman's intended target was politicians, a top Italian official said after interviewing him.

Mired in recession and suffering from soaring unemployment, Italy has been in political paralysis since an inconclusive February election. Social and political tensions have been running high among voters divided between centre-left, conservative and anti-government political parties.

Sunday was supposed to be a hopeful day when debt-ridden Italy finally got new government to solve its many problems. But shots rang out in Colonna Square near a busy shopping and strolling area shortly after 11:30 a.m. just as Premier Enrico Letta and his new ministers were taking their oaths at the Quirinal presidential office about a kilometre (half mile) away.

The suspected gunman, dressed in a dark business suit, was immediately grabbed by other police outside Chigi Palace, which houses the premier's office and other government offices. The politicians were supposed to have met at the palace later Sunday for their first Cabinet meeting.

Rome Prosecutor Pierfilippo Laviani told reporters he had questioned the alleged assailant, who was taken to a hospital with bruises after being wrestled to the ground. He identified the man as Luigi Preiti, 49, from Calabria, a southern agricultural area plagued by organized crime and chronic unemployment.

Laviani said Preiti had "confessed everything" and didn't appear mentally unbalanced.

"He is a man full of problems, who lost his job, who lost everything," the prosecutor said. "He was desperate. In general, he wanted to shoot at politicians, but given that he couldn't reach any, he shot at the Carabinieri" paramilitary police.

One of the policemen, shot in the neck, was in critical condition. The other, shot in the leg, suffered a fracture, doctors said.

The shooting "was the tragic gesture of a 49-year-old unemployed man," Interior Minister Angelino Alfano told reporters after briefing Letta and his new Cabinet.

A woman passing by during the shooting was slightly injured, Rome's mayor said. It was unclear if she was grazed by a bullet or hurt in the panic sparked by the gunfire.

The 46-year-old Letta had nailed down a coalition deal only a day ago between two bitter political enemies -- his centre-left forces and the conservative bloc of ex-Premier Silvio Berlusconi. Letta will speak to Parliament on Monday, laying out his strategy to reduce joblessness while still sticking to the austerity measures needed to keep the eurozone's No. 3 economy from descending into a sovereign debt crisis. He will then face confidence votes.

A video surveillance camera on the Parliament building caught the attacker on film just before and during the shooting, Italian news reports said.

The attacker was walking at a steady pace along a narrow street that leads from the square outside Parliament's lower house to the square outside the premier's office, when police officers appear to have stopped him to ask where he was going.

About 90 minutes later, Letta and his ministers were due to enter Chigi Palace. It was not immediately known if the attacker knew about their arrival.

Shortly after police approached him, he began firing, according to the surveillance camera.

An AP television producer saw the two wounded Carabinieri officers in the square outside the palace. One of them lay on the pavement with blood pouring out of his neck.

Alfano said the alleged gunman wanted to kill himself after the shooting but ran out of bullets. He said six shots were fired in all. The gunman used a semi-automatic pistol whose serial number had been scraped off, Sky TG24 TV said.

The interior minister said security was immediately stepped up near key venues in the Italian capital, but added authorities were not worried about possible related attacks.

"Our initial investigation indicates the incident is due to an isolated gesture, although further investigations are being carried out," he said.

Doctors at Rome's Umberto I Polyclinic said a 50-year-old brigadier had been hit in the neck by a bullet that damaged his spinal column and was lodged near his shoulder. The doctors said it wasn't yet known if the spinal column injury had caused any paralysis.

The head of St. John's Hospital, Gianluigi Bracciale, told Sky TG24 TV the second officer suffered a broken leg from a gunshot. He said Prieti didn't appear to have any injuries other than bruises.

Preiti's uncle, interviewed by Sky, said the alleged gunman had moved back to his parents' home in Calabria because he could no longer find work as a bricklayer. "He was a great worker. He could build a house from top to bottom," said the uncle, Domenco Preiti.

The shooting sparked ugly memories of the 1970s and 1980s in Italy, when domestic terrorism plagued the country during a time of high political tensions between right-wing and left-wing blocs.

The new Cabinet ministers were seen smiling in a group photo as news of the shooting broke.

"The news arrived after the swearing-in," said Dario Franceschini, one of the new ministers.

The ministers were kept briefly inside for security reasons until it was clear there was no immediate danger.

Rome was jammed Sunday with tourists and residents enjoying a warm sunny morning on the last day of a four-day weekend.