LIVERMORE — A 2-year-old girl was flown by LifeFlight helicopter to Maine Medical Center after the ATV she was riding with her father went out of control and the two of them hit a tree.

The accident occurred at 3:15 p.m. Monday. John Walker, 25, was riding a 2012 Polaris 400 with his daughter in front of him on a small dirt track alongside the Androscoggin River, said the Maine Warden Service.

Walker slowed on a corner to look behind him because he thought he was dragging something, and when he pressed the thumb throttle to accelerate, the lever became stuck behind a handle grip that had been added to the machine after it was manufactured.

The resulting acceleration threw Walker and his daughter, who was not wearing a helmet, into a tree, the Warden Service said.

The girl was flown to Portland with facial injuries and Walker, who was visiting from Brevard, N.C., was taken to Central Maine Medical Center in Lewiston for leg injuries.

The case is under investigation and no other information was available.