Singer-songwriter Bruno Mars is facing a felony cocaine charge stemming from his arrest after a performance at a Las Vegas nightclub last month.

The Clark County district attorney's office filed a criminal complaint Friday alleging the 24-year-old "Just the Way You Are" crooner had 2.6 grams of cocaine when he was arrested Sept. 19.

Mars' real name is Peter Hernandez. He is due in court Nov. 18 on the possession of a controlled substance charge.

If convicted, he faces up to four years in prison and a $5,000 fine.

Hernandez was arrested after he was detained at the Hard Rock Hotel & Casino.

Police say he told an arresting officer he never used drugs before.

"Just the Way You Are" is No. 1 on the Billboard Hot 100 chart.