Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

An allegedly disgruntled YouTube user drove across the country and was arrested before he could settle his perceived beef — perhaps violently — with the California technology giant, police said Tuesday.

Kyle Long, 33, from Waterville, Maine, was taken into custody about two miles from the headquarters of Google, which owns the video-sharing platform, according to police in Mountain View, California.

He was booked on suspicion of making criminal threats. He was being held in lieu of $25,000 bail at the Santa Clara County Jail on Tuesday, Santa Clara County Sheriff's records showed.

Kyle Long was arrested after he made threats against Google and traveled across the country to confront the company. City of Mountain View

The Maine resident first came on the radar of authorities in Adair County, Iowa, on Friday when his car got stuck in a ditch, state police said. Kyle Long was also suspected of vandalizing a gas station restroom, but police let him go because the station's owners were not interested in having him prosecuted, officials said.

While in Iowa, he told a state trooper that he was mad at Google for allegedly shutting down his YouTube channel, which gave instruction to other users on how to boost viewership and earn money, Iowa State Patrol Sgt. Nelson Ludwig said.

Ludwig didn't specify what Kyle Long allegedly said about YouTube. "It was just enough to make a call to Maine to find out more," he said, referring to police in Waterville, Maine. "It was just enough to raise concerns."

The suspect's father, Kevin Long, told NBC News on Tuesday that YouTube didn't shut down his son's channel. The elder Long said his daughter-in-law, Kyle Long's wife, was the one who disabled it, because it was gibberish.

Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

"His wife took it down as soon as he put it up," Kevin Long said. “It didn't make any sense. It was dumb; it was crazy."

Kevin Long added: "He showed it to me and it was most bizarre thing. It wasn't reality."

Kyle Long spent five years behind bars in Connecticut for a manslaughter conviction for driving his car into a utility pole, which killed his classmate passenger in 2002, according to prosecutors and prison records.

The younger Long has been in and out of jail, on and off psychotropic medications ever since getting out of prison in 2008, according to the elder Long.

The father said he hopes this latest arrest will lead to his son getting the psychiatric help he needs.

"Knowing your friend died and that you were there and responsible ... the nightmare started taking over" after he got out prison, Kevin Long said.

In Iowa, "Long informed state troopers that he was on his way to Mountain View, California, to meet with Google after his YouTube channel had been shut down, which he claimed was resulting in him losing money," according to a Mountain View Police Department statement.

"On Sunday, Waterville, Maine police notified us that they had received information that Long was not only in California, but that he had stated if his meeting with Google personnel did not go well, he was going to resort to physical violence," the statement said referring to Kyle Long.

Local police were stationed around the Googleplex and kept an eye out for Kyle Long's car, authorities said.

Then at about 1 p.m. Sunday, Mountain View police made a "high-risk stop" of his car near U.S. Highway 101 and Moffett Boulevard, which is about 40 miles south of San Francisco and 12 miles north of San Jose, in the heart of the Silicon Valley, authorities said.

He had three baseball bats with him, officials said.

Mountain View Police Chief Max Bosel thanked authorities from Iowa to Maine.

“We very much appreciated all the efforts that were made across the country to do everything possible to prevent this man bringing harm to others," he said.

It wasn't immediately known if Kyle Long had hired an attorney by Tuesday morning. A representative for Google could not be immediately reached for comment.

Last year, a California woman opened fire at YouTube offices in San Bruno before she fatally shot herself. Najafi Aghdam, 38, had accused YouTube of unfairly holding back advertising profits from her channel.