A spokeswoman for the National Rifle Association indicated Thursday that the gun rights group did not defend Philando Castile, a black man who was pulled over by police and then fatally shot in 2016, because he was breaking the law at the time of his death.

Castile was shot and killed in a Saint Paul, Minn., suburb last summer by a Falcon Heights police officer, after telling the police officer he had a license to carry a firearm. But Dana Loesch, a spokeswoman for the NRA, said there were other factors that have to be considered in the case.

"He was also in possession of a controlled substance and a firearm simultaneously, which is illegal. Stop lying," Loesch said on Twitter early Thursday.

She was responding to a tweet noting that Castile was a Minnesota carry permit holder who "followed the safety rules" but was still shot. The Twitter user questioned why the NRA was so slow to defend Castile, thinking it had to do with his race.

The police officer — Jeronimo Yanez — panicked when Castile, who said he was legally carrying his handgun, reached for his waistband. Yanez then opened fire several times.

Many who defend Yanez — who was acquitted of second-degree manslaughter earlier this year — say had Castile known what to do, he would have put his hands on the dashboard or steering wheel and waited for further instructions from Yanez. Defenders of Castile say Yanez should have told Castile what to do after he disclosed he had a concealed weapon.

The NRA was quiet on Castile's death for nearly a year following, until a CNN debate last month when Loesch called the incident "a terrible tragedy that could have been avoided."

Loesch pointed out in her Thursday tweet that Castile was breaking the law by having a controlled substance in his possession at the time of the shooting. According to a memo filed during Yanez's case by his attorneys, Castile was a regular marijuana user and had high levels of THC in his system when he died.

According to the memo, Castile lied on his application for his firearm permit by denying he was "unlawful user of any controlled substance." It is a felony to be in possession of a controlled substance while armed with a firearm, even if lawfully in possession of the gun.

Yanez testified that the car smelled like marijuana when he pulled Castile over, and later on, Castile's fiancé Diamond Reynolds told police they had smoked marijuana before being pulled over, and had the drug in their car.

UPDATE: Since this story was published, Dana Loesch contacted the Washington Examiner and said she was not speaking for the NRA in her tweet, and that she was only commenting on the technical way the issue was being described, not on the circumstances of Castile's death.

The NRA did not respond to multiple requests for comment, nor did Loesch email a statement correcting her tweet.