(dailynews.com) A Santa Clarita man was charged Tuesday with dozens of counts of rape, sexual assault and attempted kidnapping after officials said he posed as a ride-hailing driver for more than a year, picking up women in his car before attacking them — sometimes with a knife — in seven different incidents across L.A. County.

Nicolas Morales, 44, was arrested Friday by Alhambra police. He appeared at the Alhambra branch of L.A. County Superior Court on Tuesday afternoon clad in a blue jumpsuit and glasses.

After the private attorney his wife hired for his defense told the judge the firm was declining to represent him, Morales was appointed a public defender and placed back in custody under $10.3 million bail.

He faces up to 300 years in state prison if convicted as charged, said district attorney’s office spokeswoman Sarah Ardalani in a written statement.

The first attack prosecutors accused Morales of committing occurred in 2016, either late on Oct. 9 or early Oct. 10. They continued every few months until this year — the last attack Morales was charged for happened on New Year’s Eve.

Sgt. Steven Carr, a spokesman for the Alhambra Police Department, said police arrested Morales in connection to that final attack on Dec. 30, 2017.

In a written statement, Carr said a woman called 9-1-1 that night, telling police the suspect had picked her up in Los Angeles before taking her to a secluded parking lot in Alhambra, where he attacked her.

Carr said forensic evidence led police to Morales. He said detectives served a search warrant at his Santa Clarita home and seized several items. He was later arrested at the home without incident.

Alhambra police then linked Morales to several unsolved sexual assaults throughout L.A. County over the previous year, Carr said.

Previous attacks happened in three other cities: Los Angeles, Beverly Hills and West Hollywood.

In May 2017, Los Angeles police released a sketch of a rape suspect who committed a similar attack on the same day as one of the rapes listed in the felony complaint filed against Morales.

LAPD officials said in a statement that a woman leaving a club in Hollywood on Jan. 7, 2017 got in the suspect’s car thinking it was the ride-hailing car she had ordered. The suspect in that case drove the woman to a secluded location and sexually assaulted her. There was no mention of a weapon.

At the time, they described the suspect as a Middle Eastern man, 25 to 30 years old with dark hair. They also said the suspect told the victim while he was detaining her in his car that he lived in Long Beach and owned an accounting firm with his brother.

LAPD would not say whether it was believed that Morales was behind this attack.

In total, Morales faces 27 felony counts. The list of charges including nine counts of forcible oral copulation, six counts of rape, five counts sodomy by use of force and four counts of sexual penetration by foreign object.

He also faces one count of assault with intent to commit a felony, one count of attempted sodomy by use of force and one account of attempted kidnapping to commit another crime. The felony complaint included the allegation that he used a knife to commit some of the crimes.

Morales’ first attorney, Antoinette Lias of San Fernando-based Schwartz & Nader, told the judge her firm was declining to represent him after learning more about the complexity of the case. Judge Cathryn Brougham accepted the law firm’s request and appointed a public defender to Morales.

Brougham delayed Morales’ arraignment until March to give the public defender time to present his case.

Lias said the suspect’s wife hired the firm.

A deputy district attorney at the Alhambra courthouse declined to comment, referring all questions to the Alhambra police department.