A Virginia man has been sentenced to three years in federal prison for making online death threats against the former BART police officer charged with murdering an unarmed passenger on New Year's Day in Oakland, a prosecutor said Tuesday.

Jeffrey L. Weaver, 48, was also ordered by U.S. District Judge Samuel Wilson to serve three years' probation after his release from prison.

At a hearing Monday in Roanoke, Va., Wilson imposed a harsher sentence than the 15 to 21 months recommended under sentencing guidelines because of a "pattern of threatening behavior by the defendant ... including threatening the (federal prosecutor) assigned to the case," Assistant U.S. Attorney Craig Jacobsen said.

Weaver pleaded guilty in August to transmitting in interstate commerce a threat to injure a person.

Weaver used the identity "F-ThePIGS" while posting expletive-filled online comments threatening to kill Johannes Mehserle, 27.

Mehserle has been charged with murdering 22-year-old Oscar Grant of Hayward early Jan. 1 while trying to arrest him at the Fruitvale BART Station.

The online messages were reported to the FBI in San Francisco by Mehserle's father, Todd Mehserle, on Jan. 8. Johannes Mehserle's defense team cited the posts as the reason he went into hiding and was moved from place to place before being arrested.

The FBI identified Weaver through the two Internet protocol addresses that were used to post the statements.

Mehserle's murder trial has been moved to Los Angeles because of the extensive attention the case has received in the Bay Area. On Tuesday, the former officer made his final appearance in an Oakland courtroom before Judge Morris Jacobson of Alameda County Superior Court.

Jacobson told Mehserle, who is free on bail, to appear in a Los Angeles courtroom Jan. 8 for scheduling purposes.

"Mr. Mehserle, you have to be there," the judge said. "With that, good luck to you all."