MARTINEZ — Aaron Scott Doppie, the popular Contra Costa rapper who was jailed in mid-March on gun charges, was granted release from jail Monday morning, prosecutors said.

Doppie, 40, who raps under the stage name A-Wax, was placed on supervised release and electronic home detention, according to a spokesman with the District Attorney’s office. Doppie also entered a plea of not guilty on three felony charges related to alleged possession of a gun, ammunition, and an illegal magazine.

The District Attorney objected to Doppie’s release, which was granted by Judge Theresa Canepa, according to court records.

Prosecutors have previously stated that Doppie was being investigated by Pittsburg police in a homicide case. No murder charges have been filed against Doppie and authorities have not revealed any details about the investigation.

The gun charge stemmed from a March 10 raid on the 500 block of Garcia Avenue in Pittsburg. According to authorities, officers found a pistol loaded with a 30-round magazine, various kinds of ammunition, and a 100-round magazine known as a “drum.” Doppie’s attorney said at a March court appearance that the guns were simply found in the same room as Doppie, and that they were falsely assumed to be his.

Two other men, aged 43 and 20, were arrested along with Doppie, according to police records. They were released within 72 hours without being charged with a crime.

Doppie’s rap career has spanned 20 years, and he has released songs that garnered tens of millions of views collectively. During his four weeks of incarceration, Doppie released a music video that includes footage of the Martinez Detention Facility, where he was housed, as well as his March 17 court appearance in Pittsburg.

Doppie is not due back in court until July 7, according to prosecutors.