Federal ministers lauded Mr. Ahmad and his vehicle, sometimes at cabinet meetings. The stand-in minister for religious affairs, Khursheed Shah, appeared on television with him and took a ride in his small Suzuki rental, which was hooked up to a contraption that Mr. Ahmad described as a “water kit.” Respected talk show hosts suggested he should get state financing and protection.

The country’s most famous scientist, Abdul Qadeer Khan — revered inside Pakistan as the father of the country’s nuclear weapons program and reviled elsewhere as a notorious figure in the international nuclear black market — gave it his imprimatur, too. “I have investigated the matter, and there is no fraud involved,” he told Hamid Mir, a popular television journalist, during a recent broadcast that sealed Mr. Ahmad’s celebrity.

The quest to harness chemical energy from water is a holy grail of science, offering the tantalizing promise of a world free from dependence on oil. Groups in other countries, including Japan, the United States and Sri Lanka, have previously made similar claims. They have been largely ignored.

Not so with Mr. Ahmad, even if he is an unlikely scientific prodigy. Forty years old and a father of five, he graduated with a degree in mechanical engineering in 1990 from a small technical college in Khairpur, in southern Sindh Province, he said in the interview. For most of his career he worked in a local police department. He is currently unemployed.

But he sprang up at a moment when Pakistan was intensely aware of its power shortcomings. Violent riots erupted across Punjab and Khyber-Pakhtunkhwa Provinces recently as temperatures in some places hovered around 110 degrees amid electricity shortages that stretched up to 20 hours per day. Chronic shortages of natural gas, which powers many cars and homes, result in lines snaking from gas stations. Energy politics are expected to play a prominent role in elections set to take place within the next 10 months.