A 22-year-old man suspected of shooting and wounding two San Diego County sheriff's deputies has apparently killed himself during a nearly 10-hour standoff with a SWAT squad, officials announced early Thursday.

Around 1:38 a.m., deputies entered the house in the Leucadia neighborhood of Encinitas where the man had barricaded himself and found him dead of an apparent self-inflicted gunshot wound, officials said. Minutes earlier, a robotic device had been deployed by the SWAT squad to determine if it was safe for deputies to enter.

The man, whose name was not released, fired at two deputies who had gone to the home at 3:30 p.m. Wednesday after the man's mother called for help, authorities said. One deputy was struck in the leg; the other suffered a grazing wound to the head, they said.

The incident began around 1 p.m. when the man's mother reported that he had stormed into her home and was angry that she had taken out a restraining order against him, officials said.

The mother told deputies that her son had left the home after stealing her car, according to Capt. Duncan Fraser of the San Diego Sheriff's Department. At about 3 p.m., she called back to say that the son had returned to the home, he said.

Deputies who arrived at the home tried to talk the son into leaving the house. When he refused, they used tear gas but he responded by opening fire, wounding two deputies, Fraser said.

One deputy underwent surgery and is listed in stable condition at a local hospital, officials said. The other was treated and released.

The Sheriff's Department SWAT team, aided by officers from the Carlsbad, Oceanside and Escondido police departments, surrounded the home and made contact with the 22-year-old, Fraser said.

Nine surrounding homes were evacuated, with residents taken to a community center where the Red Cross provided assistance. Residents were being allowed back in their homes around 3 a.m., officials said.

At a news conference Wednesday night, streamed by San Diego television, Fraser called on the suspect to give up with no more gunfire. "We want this to end peacefully," he said.

The suspect's mother was not in the house during the SWAT action, Fraser said. Sheriff's deputies have had dealings with the suspect in the past, he added.

Sheriff Bill Gore, at the hospital where one deputy was undergoing surgery, said he is confident both wounded deputies will recover fully.

"It's been a dark few weeks for all law enforcement in Southern California," Gore said, referring to the case of fired Los Angeles Police Officer Christopher Dorner, suspected of killing four people, including an officer from the Riverside Police Department and a deputy from the San Bernardino County Sheriff's Department. Dorner died after being surrounded by officers in a cabin in the Big Bear area.

The Encinitas incident was the second within months in which San Diego deputies were wounded. Two deputies were injured in a gun battle with a child-abuse suspect in Lakeside in September; both survived and underwent surgery.

O.C. shootings: Listen to frantic 911 call

Funeral set today for deputy killed in Dorner shootout

-- Tony Perry in San Diego

hoto: An armored vehicle arrives outside a home in Encinitas where a man suspected

had barricaded himself on Wednesday. Credit: Lenny Ignelzi / Associated Press

of shooting and wounding two San Diego County sheriff's deputies