PORTSMOUTH, Va. (AP) - A Virginia man has been convicted of fatally shooting his roommate last year when the two were playing with what they thought was an unloaded gun.

The Virginian-Pilot reports 21-year-old Juan Perry entered an Alford plea Friday, which means he maintains his innocence while acknowledging prosecutors have enough evidence to convict.

Perry's plea agreement calls for a suspended 10-year sentence if he completes a "youthful offender program," which would keep Perry in prison for no more than four years. He would also receive vocational training.

Perry says he and his roommate, Jaonta Wyche, were playing with a shotgun last April in their South Norfolk home when he pulled the trigger, firing an unexpected shot at Wyche.

Prosecutors say Perry didn't intend to kill Wyche, but intended to pull the trigger.