I am now the proud owner of an iPhone. What an amazing invention! Making phone calls is only the beginning. I can figure out exactly where I am on the face of the earth, identify the best Chinese restaurant in Ames, Iowa, and plot a turn-by-turn course to drive there, all the while pinpointing exactly where I am along the way.

I can send and receive emails and text messages and even dictate them (as I am doing now). This ever-improving technology is making our lives better in ways we never imagined. With all this good, however, comes the potential for mischief, specifically the threat to invasion of personal privacy in ways that ought to scare the heck out of us.

Technology gives government and corporations alike alarming new powers to spy on average Americans.

When I set out for that Chinese restaurant in Ames, my cellphone provider has a step-by-step record of where I started, where I ended up, and where I stopped along the way. That kind of geolocation data, along with every email and text each of us receives or sends, is stored by the telecommunications provider.

Recent revelations indicate that law enforcement is accessing this information from communications providers on a massive scale. This new source of information can certainly be a useful tool to the police in solving crimes, and we should all be glad of that.

I think that most people, however, would agree that these “private records” should be turned over to the government only if there is a darned good reason.

As one judge put it when talking about location records, “One’s location might reveal whether he is a weekly churchgoer, a heavy drinker, a regular at the gym, an unfaithful husband, a patient receiving medical treatment, an associate of particular individuals or political groups, and not just one such fact about a person, but all facts.”

Certainly, we all want the police able to obtain these records in an emergency. If a child with a cellphone becomes lost, if a confused older person wanders off, or if a crime is in progress, police must be able to access provider records immediately.

Absent such an emergency, however, shouldn’t the police have to convince someone there is a darned good reason before they access the most personal of our records?

The questions then become “What is a good reason” and “Who gets to make that decision?”

The Founding Fathers answered that question for us with the adoption of the Fourth Amendment to the Constitution in 1789. While they could never imagine smartphones, they sure thought about the concept of privacy, and agreed we should be safe from police intrusion into our lives absent a showing of “probable cause.” And they wrote that that the “decider” should be a judge.

That is just the concept we put into Maine law this year.

Although some argued that we already were protected by an old federal law, that was far from clear. The relevant federal statute was passed in 1986 when cellphones were the size of breadboxes and had no GPS, texting or email capability.

Did that law still apply to today’s reality? Some courts said yes, others no. To make things crystal clear in Maine, I worked with the American Civil Liberties Union of Maine and legislation ensuring that, absent an emergency situation, prosecutors and police agency seek and get a warrant from a judge before our very private records can be disclosed.

The police also must inform the person whose records have been searched of the search, although a judge can waive that requirement if the police make the case that such disclosure would interfere with an ongoing criminal investigation.

Will this create some additional burden for law enforcement? You bet it will, but I think that’s exactly what the Founding Fathers had in mind when they wrote the Fourth Amendment. As Ben Franklin said: “Those who surrender freedom for security will not have, nor do they deserve, either one.”

By passing this legislation, Maine has become a leader nationally. We are one of only two states that now protect our people’s cellphone communications.

None of us wants to interfere with the police’s ability to catch the bad guys. At the same time, we want to protect our privacy and keep the government from snooping into our lives unnecessarily. It is a difficult balancing act. Here in Maine, I think we got it right.

Sen. Roger Katz, R-Augusta, is in his second term in the Maine Senate, representing District 24 (Augusta, China, Oakland, Sidney and Vassalboro). He is Senate assistant minority leader and serves on the Government Oversight Committee.