Meetkumar Hiteshbhai Desai was taken into custody after the Surprise Police Department, Arizona, notified the Sheriff's Office of more than 100 hang-up 911 calls.
The Maricopa County Sheriff's Office arrested the 18-year-old, accusing him of carrying out a cyberattack on the 911 system, according to a Sheriff's Office statement.
Desai was booked into a Maricopa County jail on suspicion of three counts of computer tampering.
Interference with critical infrastructure could have disrupted the 911 system in the Phoenix area and potentially other states, The Arizona Republic reported.
Investigators traced the calls and discovered they originated from a link posted to Twitter, according to the statement.
The link was to a site named "Meet Desai" and its domain was hosted out of San Francisco. When the link was clicked, it continually called 911 and would not let the caller hang up.
Peoria police and the MCSO also received a large number of calls, and the volume had the potential to shut down 911 service across Maricopa County, the Sheriff's Office said.
MCSO detectives identified 'Meet' and took him in for questioning last Wednesday.
"Meet claims that his intention was to make a non-harmful, but annoying bug that he believed was 'funny'," the Sheriff's Office statement said.
Desai told investigators that he was approached by an online friend with a bug. Desai then tweaked the bug so it would add pop-ups, prompts to open e-mail applications and activation of automatic telephone dialing on iOS devices, all via coding that Desai wrote himself.
Desai told sheriff's detectives that he was interested in programmes, bugs and viruses that he could manipulate and change. Desai said Apple Inc., the hardware and software company, would pay and credit him for discovering such bugs and viruses.
The MCSO cybercrimes unit executed a search warrant and seized multiple items at Desai's residence that will be forensically examined, the Sheriff's Office said.
Image: Meetkumar Hiteshbhai Desai. Photograph: Maricopa County Sheriff's Office