“It was an honor to know & be blessed with the opportunity to serve in Congress with JohnLewis a genuine & historic American hero. May the Lord grant him eternal peace," Sen. Marco Rubio, R-Fla., wrote on Twitter, attaching a picture of himself in a conversation with Cummings.
Lewis, an icon of the civil rights movement, died Friday at 80 from pancreatic cancer.
Rubio also briefly made the image of him and Cummings his Twitter profile picture.
Sen. Dan Sullivan, R-AK, made a similar gaffe on Facebook. The post has since been deleted but a spokesperson for the senator said in a statement that "Sullivan’s staff made a mistake trying to honor an American legend.”
Rubio's tweet has also been deleted and his profile photo has been changed, but not before users were able to screenshot his mistake and share it online.
"Earlier today I tweeted an incorrect photo," Rubio posted shortly after he deleted the photo of Cummings, a Maryland Democrat who died last year at 68 after a history of health problems.
"John Lewis was a genuine American hero," he wrote. "I was honored to appear together in Miami 3 years ago at an event captured in video below... My God grant him eternal rest," Rubio continued, this time including a picture of himself and Lewis, which he also made his profile photo.
Rubio's mistake sparked outrage among some politicians who demanded he apologize for mixing up two Black lawmakers.
“'What an honor to know ... ' Unreal. I’m glad that @marcorubio has removed this shameful post but he owes an apology to both the Lewis family AND the Cummings family," Rep. Bobby Rush, D-Ill., tweeted.
Rep. Adriano Espaillat, D-N.Y., called Rubio's tweet a "disgrace" and said that "as the senior U.S. Senator from your state, you as well as your staff should know the difference between the late Congressman Elijah Cummings and Congressman John Lewis. #DISGRACEFUL... correct it and get it right!"
Lewis, the son of a sharecroppers, served in Congress for more than three decades representing the Atlanta area.
Lewis was an advocate of nonviolent protest whose skull was fractured by Alabama state troopers during Bloody Sunday on the Edmund Pettus Bridge in Selma in 1965. He was the last surviving speaker from the 1963 March on Washington.