Joe Arpaio's campaign complains that Cindy McCain blocked him on Twitter

Yvonne Wingett Sanchez | The Republic | azcentral.com

Show Caption Hide Caption How will U.S. Sen. John McCain be replaced? When a U.S. senator leaves office before the end of his or her term, what happens?

Senate candidate Joe Arpaio complained on social media Friday night that U.S. Sen. John McCain's wife, Cindy, blocked him from seeing her posts on Twitter.

Arpaio’s complaint came on the day the McCain family is coping with the end stages of his brain cancer.

Some thought it an unseemly attempt to attract attention to his struggling Republican campaign.

"You have one more example of Joe Arpaio having extremely poor taste in pursuit of his political ambitions," Republican consultant Nathan Sproul said.

But it also may be an effort to draw the attention of President Donald Trump, a friend who could still impact Arpaio’s prospects as voting draws to a close next week.

RELATED: Sen. John McCain to discontinue cancer treatment, family says

Arpaio, 86, is in the final stretch of a three-way contest for the Republican nomination for the U.S. Senate.

The former sheriff of Maricopa County is vying against U.S. Rep. Martha McSally and former state Sen. Kelli Ward. Polls show the former sheriff in last place, a standing he has dismissed as "fake."

The primary election is Tuesday.

"I tweeted out my thoughts & prayers for" the senator and Cindy "BLOCKS me on twitter?" said the post from Arpaio's campaign account, which tagged reporters, as well as Trump.

A six-term Senate veteran, McCain has stood up to Trump when he has disagreed with his policies, politics and rhetoric.

Trump has mocked McCain, a Vietnam war hero, for being captured and expresses his displeasure during rallies at the senator's vote against GOP efforts to repeal the Affordable Care Act.

Arpaio's post included a picture of a notification that appears when people are "blocked," or prevented from seeing other users' account information.

The post also included a screenshot of a statement Arpaio posted on Twitter earlier in the day that read, "Although we've had our differences, my thoughts and prayers" were with McCain and his family.

RELATED: Tweet by tweet: John McCain and Donald Trump have feuded for years

Arpaio has feuded for years with the senator.

Arpaio is nationally known for his hard-line stance on illegal immigration, and he is popular with the conservative Republicans who have opposed McCain's championing of bipartisan immigration reform.

RELATED: Arpaio's Senate campaign in chaos

Here's who is running for Senate in Arizona Here's what you need to know about Arizona's Senate candidates: Kyrsten Sinema, Deedra Abboud, Joe Arpaio, Martha McSally and Kelli Ward.

In the 2008 presidential primary season, for example, Arpaio made waves when he sided with former Massachusetts Gov. Mitt Romney over McCain, the home-state candidate. Arpaio even campaigned in the key early presidential states of Iowa and New Hampshire for Romney and against McCain, who eventually went on to win the GOP nomination.

RELATED: Arizona primary candidates for U.S. Senate: What you need to know

Follow the reporter on Twitter @yvonnewingett and on Facebook. Reach her at yvonne.wingett@arizonarepublic.com.