A Florida state senator who unleashed an expletive-laden rant over drinks with two other lawmakers this week, uttering a racial slur for black people and other vulgarities, resigned from his position on Friday.

State Senator Frank Artiles, a Republican from Miami-Dade County, apologized the day after the episode, saying on Tuesday that he let his “temper get the best of me.” But Mr. Artiles continued to face increasing pressure to resign. The state’s Democratic Party and members of the Florida Legislative Black Caucus said that an apology was not enough.

On Friday, Mr. Artiles said he would step down immediately.

“It is clear to me my recent actions and words that I spoke fell far short of what I expect for myself, and for this, I am very sorry,” he wrote in his resignation letter. “I am responsible, and I am accountable, and effective immediately, I am resigning from the Florida State Senate.”

The profane tirade occurred on Monday night at the exclusive Governors Club in Tallahassee during a conversation at a table with several people, including two other state senators, Audrey Gibson and Perry Thurston, both Democrats who are black.