A man who faced felony charges after being shot at while trying to break into a north suburban home last year is back behind bars, but this time, according to authorities, he did the shooting.

Erik G. Mota, 28, was charged Tuesday with shooting a man who was visiting Mota’s home in Round Lake Beach, according to Round Lake Beach police.

At the time of his arrest, he was out on bond after an incident in Long Grove last October in which Mota was shot at by a homeowner while attempting to burglarize a home, according to the Lake County sheriff’s office.

In the latest case, officers were called about 6 p.m. Tuesday to a report of a person shot in the 1300 block of Red Oak Circle in Round Lake Beach, police said.

The victim, a 21-year-old man, was visiting Mota when he was shot, a statement from police said. Officers arrived to find the victim in a car outside the home.

He had suffered a gunshot wound to the chest, police said. He was hospitalized, and the injuries were not thought to be life-threatening.

During a search of Mota’s home, between 100-500 grams of cannabis were found, police said.

He was charged with aggravated battery with discharge of a firearm, aggravated battery causing great bodily harm, possession of cannabis, and possession of a firearm with defaced ID, all felonies, police said.

He was already out on bail after being charged with attempted residential burglary, and burglary to a vehicle, according to Lake County sheriff’s spokesman Lt. Christopher Covelli.

Officers were called about 4 a.m. Oct. 20, 2016, to a home in the 3000 block of Country Lane Road in Long Grove for reports of a burglary in progress, the sheriff’s office said at the time.

The homeowner was asleep on a couch when he woke up to find Mota trying to break in through a screen door, and then through the window of the house, according to police.

The homeowner got a pistol and fired four shots at Mota, one of which grazed his pants leg and another hit his vehicle, Covelli said at the time. Mota drove off, leaving behind a number of items he was apparently planning to steal from two vehicles he’d broken into in the driveway, authorities said.

A short time later, Vernon Hills police officers were called about a suspicious vehicle in the 800 block of Westmoreland Drive, and found Mota changing a flat tire.

Mota, who lived on that block at the time, was identified as a suspect in the Long Grove burglary attempt and taken into custody, the sheriff’s office said.

After being charged on Oct. 21, he was released after paying 10 percent of a $5,000 bond, according to the sheriff’s office. After his arrest this week, he was ordered held on a $250,000 bond.

The homeowner in the Long Grove incident was not charged.