The man who provided the gun used to kill a Maryland State trooper outside a Forestville Applebee’s in 2010 was sentenced to five years in prison Thursday for his role in the crime, authorities said.

Anthony Milton, 29, had pleaded guilty to being an accessory after the fact to the June 2010 slaying of Trooper Wesley Brown, who was gunned down while working an off-duty security job at the Applebee’s on Donnell Drive. His five-year sentence came as part of a deal with prosecutors in which he agreed to testify against Cyril Williams — the man who actually shot and killed Brown.

Williams was convicted last week on first-degree murder and other related charges. At Williams’s trial, Milton testified that Williams called him on the night Brown was killed to get back a gun that Williams had loaned to him. Milton testified that he drove with Williams to the Applebee’s, and he saw Williams open fire at the restaurant’s door.

Prosecutors said Williams, 29, was upset because Brown had thrown him out of the restaurant earlier that night, and he came back seeking revenge.

Williams is scheduled to be sentenced in May.