Updated

A Los Angeles man has been charged with raping a woman in a city park 12 hours after being released from jail nearly two months early.

Edgar Alexander Lobos, 27, left a Los Angeles County jail just after midnight Sunday, according to police and court records. Around noon Monday, Lobos pointed a gun at a woman's head the park, forced her into a restroom and sexually assaulted her, police say.

A spokeswoman for the Los Angeles County Sheriff's Department, the agency that freed Lobos, was unable to immediately explain the early release. The county jail system has chronic overcrowding that often leads to inmates leaving before their sentences are completed.

He was sentenced to 90 days in jail last month for a drug-related parole violation but was released after 33 days, jail records show.

The 31-year-old woman helped them identify and arrest Lobos on Tuesday by describing his distinctive facial tattoos, police said. At the time of his arrest, Lobos had a small-caliber gun used in the attack, police said. It wasn't clear how he obtained it.

Lobos faces one count each of rape and forcible sodomy among other charges related to the attack in Lincoln Park on the city's east side, about 3 miles from downtown. A judge ordered Lobos held on $3 million bond at a court hearing Thursday.

Lobos, who is suspected of being a gang member, has prior convictions dating to 2007. He was sentenced to four years in prison in 2011 after pleading no contest to domestic abuse and to two years in 2014 after pleading no contest to being a felon in possession of a gun.

Lobos faces life in prison if convicted of all the charges. It was not immediately clear if he had a lawyer.

His next court appearance is May 26.