On March 5, Sen. Gary Farmer, along with 17 of his colleagues, voted 'no' on the Marjory Stoneman Douglas High School Public Safety Act, which included modest restrictions on gun purchases.

Nearly four months later, Farmer, D-Fort Lauderdale, got a letter from longtime Florida National Rifle Association lobbyist Marion Hammer thanking him for his vote.

"We cannot thank you enough for voting with the NRA and against gun control," Hammer's letter, dated June 27, reads. "Please accept our sincere appreciation for your outstanding pro-gun vote."

But Farmer said the NRA had another motive in sending the letter: to boost his 2018 Democratic primary opponent, former state Rep. Jim Waldman, whom Farmer also defeated in 2016. (There's no Republican challenging Farmer, so the winner of Democratic primary will get the Senate District 34 seat.)

Farmer is in essence contending that the NRA is using political reverse psychology: Hammer complimented a candidate the NRA opposes in order to get a staunchly liberal Senate district, from the same county as the Parkland shooting no less, to reject that candidate.

The Tampa Bay Times did not obtain the letter from the NRA, Farmer or Waldman. Hammer declined to comment for this story.

Let's take a closer look at this bizarre situation. Here's Farmer's case for NRA subterfuge, in three bullet points:

1. The NRA has no reason to like Farmer.

Farmer says he voted against SB 7026 because its gun control measures didn't go far enough. The bill, among other things, raised the gun purchasing age from 18 to 21, imposed a three-day waiting period on all gun purchases and banned the sale of bump stocks.

Read more: Here's what's in SB 7026.

Before it became law, Farmer filed 24 amendments that would have added stricter gun regulations to the bill, nearly everything from requiring all gun sales to go through licensed dealers to an assault weapons ban. The Senate only voted on five of Farmer's amendments, and it adopted none.

"The letter is belied by all of my actions," Farmer said.

Waldman said whatever Farmer's intentions, he voted against a bill the NRA staunchly opposed — and Parkland victims' families supported. (Twelve Senate Democrats voted against SB 7026. Waldman says he would have voted for it.)

"I don't care whether there's a letter or not, he voted with the NRA," Waldman said.

Farmer said that although the NRA has made noise about its opposition to SB 7026 — they've even sued the state over it — the national gun rights advocacy group is probably happy the Legislature failed to pass stricter gun control measures.

"While it had a few little crumbs of gun safety leg in it, it didn't have an assault weapons ban and it put guns in our schools," Farmer said. "If we had stopped that bill, we would have gotten a better bill…I really don't believe the NRA when they say they hate this bill."

2. The timing of the letter

Waldman filed to challenge Farmer June 22. Why did the NRA wait until just five days after Farmer got a serious primary opponent to send him a thank you letter?

Farmer says the timing is no coincidence.

"That letter is a pretty shallow and disingenuous attempt to confuse voters in the Senate District 34 primary," Farmer said.

Farmer's not the only one who shares that theory. Sen. Jose Javier-Rodriguez, D-Miami, also voted against SB 7026. But he's not up for re-election in 2018, and he didn't get a thank you letter.

“I think they do that kind of thing,” Rodriguez said of the NRA trying to hurt Farmer politically by thanking him.

Sen. Daphne Campbell, D-North Miami Beach, who voted 'no' on SB 7026 — and who, like Farmer, has a serious primary challenger in Jason Pizzo — also received no letter.

But Waldman said the reason Farmer got the letter is simple: He's a 2018 candidate who voted against an important piece of legislation that the NRA opposed.

"I can say this, I never got a letter from the NRA thanking me for any votes," Waldman said.

3. The NRA would prefer Waldman to Farmer

The NRA doesn't like Farmer or Waldman. But Waldman's rating from the group is slightly higher than Farmer's. According to grades published by the Sun Sentinel, Waldman recently got a 'D+' rating from the NRA, while Farmer got an 'F.'

"I worked damn hard to get that F," Farmer said. (PolitiFact weighed in on a 2016 dustup between the candidates over their ratings.)

Waldman said he didn't fill out the NRA questionnaire from which the ratings are derived. The group likely graded Waldman using votes he cast as a state Representative, he said.

"They could have graded me anything they wanted," Waldman said.