A Fairfax County police sergeant was sentenced yesterday in federal court in Alexandria to two years' probation for his admission that he checked police databases for someone who was the target of a federal terrorism case.

Sgt. Weiss Rasool, 31, initially faced up to six months in jail, but federal prosecutors urged U.S. Magistrate Judge Barry R. Poretz to consider as much as a year of jail time after Rasool took a lie-detector test last week and "was not fully compliant" with the test procedures. Prosecutors also said in a motion filed with the court that FBI agents "do not believe that he has been truthful."

Before sentencing, Rasool stood and wept as he admitted breaking the law.

"If I could turn back time, I would maybe do things different," he said. "It was an error in judgment. I never intended for things to turn out this way. I don't know what to say to you or anyone. . . . I admit I made errors of judgment. But I never intended to put anybody's life at risk."

The police sergeant said after the sentencing that he hopes to remain with the Fairfax department. A misdemeanor conviction does not automatically disqualify him from continuing with the force. Rasool remains on administrative leave with pay pending the outcome of an internal investigation, Fairfax police said.

In June 2005, when federal agents had a Fairfax man under surveillance, the man apparently asked Rasool to check the license plates of three vehicles he thought were following him. Rasool's lawyer described the man as a member of Rasool's mosque.

According to court records, Rasool checked the databases and left the following voice-mail message for the man:

"Umm, as I told you, I can only tell you if it comes back to a person or not a person, and all three vehicles did not come back to an individual person. So, I just wanted to give you that much."

The three vehicles were undercover FBI vehicles, according to a letter from the FBI filed in court yesterday, and Rasool's message "likely alerted the subject of the FBI investigation which had a disruptive effect on the pending counterterrorism case." Prosecutors said the vehicles were listed with a leasing company, which an experienced officer might have known was an indicator of law enforcement vehicles.

The target was arrested in November 2005, then convicted and deported, according to court filings in Rasool's case. Assistant U.S. Attorney Jeanine Linehan said that the target and his family were already dressed and destroying evidence at 6 a.m. when agents arrived to make the arrest, indicating that they had been tipped off. The target's name and the charges against him have not been disclosed.

In October 2007, the FBI confronted Rasool about his computer inquiries on the man's behalf. According to a brief written by Linehan, Rasool denied knowing the man. When presented with the recording of his message for the man, Rasool admitted checking the databases, Linehan wrote.

Linehan also noted that Rasool made computer inquiries about himself, through the National Crime Information Center system, about 17 times in 18 months, purportedly to see whether his name appeared on the terrorism watch list. His lawyer, James W. Hundley, said Rasool checked the database because of increased scrutiny of Muslims in the United States after the attacks of Sept. 11, 2001.

In January, Rasool pleaded guilty to a misdemeanor count of unauthorized computer access. He acknowledged checking his name and those of family members on the Violent Crime and Terrorist Offender File, maintained within the NCIC system, but said he did so to be sure the names were not there by mistake.

Hundley said that Rasool did not remember making the computer inquiries for the investigative target, and that Rasool did not tip off the target to his impending arrest.

Rasool's lawyer filed character-reference letters from Rasool's friends, family and co-workers, including Lt. Susan Lamar, the assistant commander of the McLean station, where Rasool worked. Lamar wrote that, compared with similar computer violations by Fairfax officers, Rasool's "seems to be the least significant."

Poretz told Rasool that some of his conduct "appears to strain credulity, to this court." But he declined to consider a sentencing range of six to 12 months in jail and gave Rasool credit for "acceptance of responsibility," a key factor in federal sentencing guidelines.

The magistrate judge then offered a stern analysis, saying: "What we have here is a defendant doing stupid things. What we have here is a credibility issue as to the defendant." But he found no evidence that Rasool intended to disrupt the federal investigation.

He placed the sergeant on two years of supervised probation and fined him $1,000.