When a small-town Arizona cop stopped a 12-year-old reporter who was chasing down a story tip on Monday, he probably had no idea what he was getting himself into.

Hilde Kate Lysiak, the preteen journalist whose exploits have inspired a Scholastic book series and an upcoming TV show, made a name for herself in 2016 by being the first to report on a grisly murder in her hometown, then firing back at the haters who suggested that a 9-year-old girl shouldn’t be hanging around crime scenes. Since then, she has continued to break news about bank robberies, alleged rapes and other lurid crimes in the Orange Street News, the paper that she publishes out of her parents’ home in Selinsgrove, Pa.

“NOTE TO DEALERS: OSN Will Not Be Intimidated,” she wrote last month, after reportedly receiving threats because she had published text message exchanges between an alleged drug dealer and a woman whom he had reportedly solicited for sex.

So naturally, she didn’t back down when Joseph Patterson, the town marshal in Patagonia, Ariz., allegedly threatened to throw her in juvenile jail on Monday, then falsely claimed it would be illegal for her to film him and publish the video on the Internet. Instead, she posted their exchange on YouTube and in the Orange Street News — which in turn prompted town officials to discipline Patterson, as the Nogales International was the first to report on Wednesday.

Lysiak, whose father is also a journalist, hasn’t said what brought her to rural southern Arizona. But she has found no shortage of stories to cover there. Last week, she interviewed residents to see how they felt about President Trump’s proposed border wall, then briefly hopped over the barbed-wire fence separating the United States from Mexico. “Even a 12-year-old can easily get through it,” she commented.

She also broke the news on Feb. 14 that one resident had spotted a mountain lion roaming around Patagonia, a town of fewer than 1,000 people nestled in the foothills of the Santa Rita Mountains. That evidently irked Patterson, who “took exception” to her attempts to chase down the story, the International reported. “We’re trying to keep people away from there,” he told the paper on Tuesday when asked about the sighting.

In the Orange Street News, Lysiak wrote that she was riding her bike to investigate a tip at around 1:30 p.m. on Monday when Patterson, whose position in the small town is equivalent to that of a police chief, stopped her and asked for identification. The 12-year-old gave her name and phone number and mentioned that she was a member of the media. She said Patterson told her, “I don’t want to hear about any of that freedom-of-the-press stuff” and added that he would have her arrested and thrown in juvenile jail.

Later, Lysiak ran into Patterson again. This time, she was filming.

“You stopped me earlier and you said that I can be thrown in juvie,” she can be heard asking in the video. “What exactly am I doing that’s illegal?”

From the seat of his white Chevy Silverado truck, Patterson started to reply, then interrupted himself. “You taping me?” he asked. “You can tape me, okay, but what I’m going to tell you is if you put my face on the Internet, it’s against the law in Arizona.”

In fact, there is no such law. Recording a law enforcement officer in a public place is protected under the First Amendment, as Lysiak noted when she posted the video online later that day.

While Lysiak sat on her bike, Patterson told her that he had noticed her following him around town while he responded to urgent calls. “Yeah, so how is that illegal?” the young reporter countered. The marshal told her that he didn’t want her to be harmed by the mountain lion that had been spotted, and he accused her of disobeying his commands and lying to him when she said she was headed to a friend’s house, which she disputed. Finally, he told her, “I’ll be getting a hold of your parents,” and drove off.

By early Friday morning, the YouTube video had been viewed more than 22,000 times, and hundreds of people had left comments calling Lysiak a “hero” and expressing outrage at Patterson’s false claim that it would be against the law for her to film him.

“Clearly, he is clueless about your constitutional rights to report the news,” one supporter wrote. Another fan, writing on the Orange Street News’s Facebook page, said that Lysiak was owed an apology. Meanwhile, a popular Texas-based YouTube account reposted her footage and added Patterson’s phone number, suggesting that anyone who was equally incensed should give him a call. (Lysiak later requested that people refrain from posting the marshal’s contact information online.)

A notice posted on the town of Patagonia’s website on Wednesday said that officials had received “many comments” about Patterson’s confrontation with Lysiak. “The matter has been carefully reviewed and we have taken action we believe to be appropriate for the situation,” the statement said. “We do not publicly disclose personnel actions including discipline and will have no further comment on this matter.”

The bulletin further suggested that “relevant information” could be found in an Arizona statute that bars people from posting personal information belonging to police officers, prosecutors, judges and other officials online — if doing so could put them and their families at risk. It did not specify why that law would be relevant, or whether Lysiak had been accused of breaking it.

In an email to The Washington Post, Dan Barr, an attorney with the First Amendment Coalition of Arizona, called the town’s reference to that statute “pure nonsense.” The law deals with publicizing information such as home addresses and “has nothing to do with taking photos of uniformed police officers doing their jobs in public,” he wrote.

Barr added: “Hilde is a force of nature. One can only imagine what sort of stories she will be turning out once she has a driver’s license.”

Patterson could not be reached for comment late Thursday. According to the International, it’s not the first time that he has told citizens that they have no right to film him while he is carrying out his official duties. In 2013, Peter Pototsky, who lives in the area, had been protesting a Border Patrol checkpoint when Patterson pulled up. Pototsky told the paper that he started videotaping his encounter with the marshal, only to be told that it was against the law to do so and that he would be prosecuted if he posted the footage online. He later filed a complaint with the town manager.

On Thursday, Lysiak said that she was happy with the outcome of her confrontation. She also begged people not to dox Patterson again.

“I am glad the town has ‘taken action’ but one note, I don’t believe people should spread around the Marshal’s personal information on the Internet,” she wrote on Twitter. “My focus is on protecting our First Amendment Rights. Thank you.”

More from Morning Mix:

‘Rule by tyranny’: American-born woman who joined ISIS must be allowed to return, lawsuit says

One twin was a citizen, the other undocumented. A victory in court for their same-sex parents rebukes the State Dept.

Charles Barkley’s advice to Jussie Smollett: ‘If you’re going to break the law, do not write a check’