KINGSTON — A Democratic congressional candidate who has launched two data analytics companies is vowing to crack down on companies like Google and Facebook that collect and profit from citizens' personal online data.

Pat Ryan, who declared his candidacy for the seat of Republican Rep. John Faso, R-Kinderhook,  last summer, didn't expect data mining and consumer privacy to become a focal point in his campaign for the 19th district seat.

The 36-year-old Iraq war veteran and Kingston native has leaned on his military experience and status as a small business owner for credibility to speak persuasively to voters in the politically divided district about his ambitious gun control and economic platforms.

While acknowledging he moved to the district to run for office, as a graduate of West Point U.S. Military Academy and the son of a Kingston business owner and school teacher, Ryan touts his five-generation roots in the area.

"This is a community that sent me care packages in Iraq from my mom's second-grade class. So when my community is in trouble, absolutely, I came back here to stand up for my community," said Ryan, who lives in Gardiner, Ulster County, with his wife.

In February, the Intercept published an article highlighting Ryan's experience at data-collection firms that have been accused of spying on left-leaning organizations.

The story tapped into growing anxiety over social networks releasing consumer data to large cyber analytics firms in the wake of the recent Facebook privacy breach involving Cambridge Analytica, which worked on behalf of President Donald Trump's campaign. It also has provided Ryan with an opportunity to distinguish himself in a crowded field of Democrats.

"I said to my wife, years ago, that the level of data that Facebook and Google have is scary to me. At the time, the discussion in the country is what the government was doing with people's data. We weren't talking about what these private companies need to do," Ryan said. "I'm glad we are having these conversations and absolutely will lead the charge to crack down."

The article spotlighted leaked emails from Ryan's first job after the Army, Berico Technologies, in which he unwittingly courted a law firm representing the U.S. Chamber of Commerce, which was seeking to spy on unions and left-wing activists. The contract was never finalized, and Ryan said he was unaware of who the client was or the scope of the project.

He said the piece also misrepresented his later work at Dataminr, which synthesizes social media data for law enforcement, financial, and media sectors.

"The Intercept article was concerning to me, because it goes against everything I believe in and my commitment to privacy," Ryan said. "I never imagined that my core values would be challenged that way."

Increasingly, Ryan finds himself at campaign stops discussing philosophical questions around national security, domestic surveillance and data mining with politically engaged audiences.

The scrutiny has prompted the candidate to flesh out his platform on consumer privacy, and he cited a New York Times article by Tim Wu — the Columbia  Law professor who coined the phrase "net neutrality" and ran an underdog campaign for lieutenant governor of New York in 2014 — that captures his views on the issue.

Ryan says he supports guidelines like President Barack Obama's proposed "Privacy Bill of Rights," which failed after it was criticized both by tech companies balking at the regulations, and privacy advocates, who say it didn't go far enough. Ryan believes the country should also look to Europe, which in 2016 passed its General Data Protection Regulations, privacy rules that empower consumers to control their own data.

In fundraising, Ryan is a front runner with $1.3 million raised, closely tailing attorney Antonio Delgado and corporate executive Brian Flynn, according to federal elections filings.

Some of those contributions have raised eyebrows. Ryan is supported by veterans groups and has solicited much of his campaign cash from former colleagues at data analytics firms who may stand to gain from fewer controls on the industry. He has received about $35,000 in campaign donations from employees of Palantir Technologies and $15,975 from members of Dataminr, according analysis from Open Secrets.

Ryan says the contributors are tech industry friends who share his views on consumer privacy, noting that companies he has worked for turn down projects that conflict with their commitment to civil liberties.

Because the industry is currently unregulated, he said, "people approach you all the time and you have to weigh it and make hard decisions."

His first-hand experience running up against the ethical boundaries of the industry make him uniquely qualified to serve in Congress, he said.

"We are very far behind in defining privacy laws and I think one of my strengths in Congress is knowing where to draw that ethical line," Ryan said.

At least one local civic group has endorsed Ryan — along with former Gov. Andrew Cuomo staffer Gareth Rhodes — because of his expertise in the technology sector, as well as his "down to earth demeanor."

"He would curtail the ability of private companies to collect personal data," Oblong Valley Indivisible wrote in its endorsement. "He takes the position that people should control their own data. He is also a supporter of internet neutrality."

Privacy advocates, alarmed by the rising influence of the advertising lobby in Washington, D.C., don't all see it that way.

"You can make a credible case that a certain amount of data collection is necessary abroad for national security purposes and if there is a court order, for domestic purposes, but anyone who works in the data industry doesn't have the average consumer in mind," said Jeffrey Chester, executive director of the Center for Digital Democracy.

Incidentally, the two companies Ryan co-founded, Praescient Analytics and Second Front Systems, focus on national security and cyber security, using data intelligence to protect troops from ISIS and American citizens from foreign cyber attacks. At the same time, Ryan says he strongly opposes the 2001 Patriot Act, which enabled law enforcement to infringe on civil liberties.

He says public service is in his blood, from that time he joined Kingston High School's student government to push for diverse lunch options, to his two tours in Iraq.

Ryan's other policy planks are similar if slightly more moderate and pragmatic than the six other Democratic contenders vying for the congressional seat, a group that includes agricultural economist Erin Collier, attorney David Clegg and former U.S. diplomat Jeff Beals. Expanding environmental protections, defending immigrant rights, moving the country towards universal healthcare, and tackling the opioid epidemic are among Ryan's priorities.

He also hopes to help shift the "tone and tenor" of the conversation in Washington.

"What we've lost in our politics is asking what's in the greater public good and who can articulate and sell those policies in an authentic way," Ryan said.