The story seemed to begin innocuously — a tale of a White House romance, delivered in gossipy style, with the help of paparazzi who caught the attractive staffers canoodling around town.

But it gave only a hint of a darker intrigue that was percolating — as reporters for strikingly different publications chased a story about domestic abuse allegations against the male half of the couple, Rob Porter, whose job as the president’s staff secretary involved handling highly sensitive documents.

It’s not clear who nudged reporters to look into Porter, who had previously kept a low public profile, or why the story was ultimately broken by DailyMail.com — the tabloidy American offshoot of the British newspaper that’s often been friendly to President Trump — and the Intercept, a website co-founded by journalist Glenn Greenwald that specializes in hard-hitting reporting about national affairs.

But two weeks later, what began as gossip has evolved into a story about national security that continues to roil the White House, with officials offering conflicting accounts about what they knew and when. The revelation that allegations of abuse kept Porter from receiving a security clearance has raised questions about how the White House handles classified materials. Chief of Staff John F. Kelly, who has withstood withering criticism for his handling of the matter, on Friday approved an overhaul of security clearance procedures.

And yet the Porter story appears to have been hiding in plain sight for months. The keys to cracking it were an obscure blog essay and an Instagram post by Jennie Willoughby, Porter’s second ex-wife, describing his mistreatment of her.

She posted them April 24, using her name though not his. But “I had no followers,” Willoughby said in an interview last week. “No one knew about this blog.”

She was aware of two readers, though: Porter, who asked her to take down the essay several times last year (she refused), and Porter’s recent ex-girlfriend, who Willoughby says contacted her and Porter’s first ex-wife about her own troubled relationship with Porter.

Journalists didn’t enter the picture until late January, when reporters at the Intercept began pursuing a tip about Porter’s history of domestic abuse. The New York Times also pursued it, according to Elisabeth Bumiller, the newspaper’s Washington bureau chief, but the paper was unable to beat the two smaller competitors on the story. Bumiller declined to discuss the Times’s reporting, as did the Daily Mail.

On Feb. 1, the Daily Mail made its first pass at the story, reporting on an unfolding romantic relationship between Porter and Hope Hicks, the White House’s communications director. Hicks and Porter were apparently unaware that a Mail photographer and videographer were tracking them the night of Jan. 27 as they took a cab from a D.C. restaurant to Hicks’s apartment. The headline was classic tabloid: “EXCLUSIVE: White House romance!”

That first article made no mention of any abuse allegations against Porter, and it is unclear whether the Mail’s journalists had yet become aware of those allegations when it set out to break the story of his romance with Hicks. It did note that Porter had been living with another woman, described by the Mail only as “a willowy blonde political appointee,” and that their relationship ended when she discovered text messages between Hicks and Porter.

By Feb. 5, Willoughby was fielding calls from both the Mail and the Intercept, within an hour of each other, seeking comment on her nine-month-old blog post. At that point, Willoughby said, she decided to go on the record about Porter’s alleged abuse. But first she contacted Porter’s first ex-wife, Colbie Holderness, and they jointly decided to talk to the two publications.

“I didn’t want to speak for Colbie,” Willoughby said. “It had to be her decision, too.”

The Mail was the first to publish an article about the allegations, on Feb. 6. The article, by reporter Louise Boyle, contained one surprise for Willoughby: She wasn’t aware that the Mail had obtained a copy of the protective order that she filed against Porter in 2010 after he smashed a window on a door to their home. “I didn’t know they had it until they published it,” she said.

The Intercept’s reporter, Ryan Grim, added an important element on Twitter even before he and co-writer Alleen Brown published their article a day later. He tweeted a photo sent to him by Holderness that showed her with a black eye, allegedly the result of a punch thrown by Porter during an argument on their honeymoon in 2003.

The photo added one more damning element to the unfolding story, and it undermined the White House’s initial effort to stand behind Porter through supportive statements apparently orchestrated by Hicks. (The Post subsequently reported that Porter’s ex-girlfriend contacted White House counsel Donald McGahn in November and told him about the ex-wives’ allegations against Porter. The woman could not be reached for comment for this story.)

Grim won’t disclose the identity of his tipster but describes his informant as “an old source who knew this was the kind of rumor I’d want to hear about and would chase down. I don’t know the motivation beyond that.”

He added: “It was of course frustrating to see the Mail publish its interview with [Willoughby] before we posted our story, because we were adding much more context. After the White House so firmly stood behind him, we decided to publish the photos that night rather than wait until the morning. Colbie thought it was important, and I agreed, of course, to get them out quickly in the face of those denials.”

Porter has denied the abuse allegations but resigned from the White House within hours of the publication of the Mail and Intercept articles. He and Hicks have made no further public statements.

And according to the Daily Mail, their romance is over.