Marco Rubio tweets photo of Elijah Cummings in John Lewis tribute

The tweet was deleted after about 20 minutes.

Sen. Marco Rubio, attempting to pay tribute to Rep. John Robert Lewis, the Georgia Democrat and civil rights icon who died late Friday, instead tweeted out a photo of him standing with Rep. Elijah Cummings, who died last year.

Rubio's tweet, which was deleted after about 20 minutes, read: "It was an honor to know & be blessed by with the opportunity to serve in Congress with JohnLewis a genuine & historic American hero. May the Lord grant him eternal peace."

The senior senator from Florida also made that photo his Twitter avatar before later changing it to a photo of him and Lewis.

The social media flub caught the eye of many, and Rubio later tweeted that he'd shared "an incorrect photo."

Lewis, known as the "conscience of the U.S. Congress," died seven months after a routine medical visit revealed he had stage 4 pancreatic cancer. He was 80.

Cummings, a long-serving Democratic congressman from Maryland, died in October due to complications from longstanding health challenges.

ABC News' Benjamin Siegel and Trish Turner contributed to this report.