A Janesville man pleaded guilty Tuesday to armed robbery from a late August home invasion during which he had a fake gun, and a Rock County judge sentenced him to six years of probation.

Judge John Wood also sentenced Jovanni J. Sanchez, 23, of 2209 Dupont Drive, to serve one year in jail with work-release privileges as part of a plea agreement.

Other charges were dismissed and read into the record.

The male victim from the home invasion required stitches and suffered a swollen head and black eye, Wood said at a hearing Tuesday afternoon. The victim missed work for a week or two, had to borrow money and lost sleep, the judge added.

A Madison Street couple on the near west side said someone knocked on their door in the early morning hours of Aug. 29, saying he was a “neighbor,” according to a criminal complaint. After a man opened the home’s door slightly, he was hit on the head with a gun.

During a struggle, the man pulled off Sanchez’s mask and recognized him from years before, the complaint states.

The man’s girlfriend threatened the invaders with a large ceramic bowl, according to the complaint. But one of them took the bowl from her and held her from behind to restrain her.

The man told authorities he gave the robbers about $1,800 in cash because they threatened his girlfriend, the complaint states. The robbers then left.

It was not immediately clear if the second robber was identified or arrested. Attempts to reach officials from the case Tuesday afternoon were unsuccessful.

Assistant District Attorney Mary Bricco said during the hearing the incident was a “very serious situation” in which someone could have been killed. She said a lengthy prison term is hanging over Sanchez’s head if his probation is revoked.

Kelly Mattingly, the lawyer who represented Sanchez, said the incident was out of character for his client. Sanchez has two children and recently lost his job, likely because of the COVID-19 pandemic, the lawyer said.

Wood said the felony conviction will “follow Mr. Sanchez for the rest of his life.”

A restitution hearing for Sanchez’s case is scheduled for 2 p.m. July 1.

Sanchez has to begin the jail portion of his sentence by July 31.