CHARLOTTE, N.C. — Duke Energy Corp. is finally converting methane gas from North Carolina’s plentiful hog operations into gas that could be burned at electric power plants.

The country’s second largest electric company said Tuesday that for the first time it is piping purified methane from industrial-scale hog farms into natural gas lines that supply power plants.

The milestone comes more than a decade after North Carolina legislators directed the company to start using animal waste to generate a fraction of the electricity it sells.

The biogas project captures methane from the hog waste of five Duplin County hog farms, pipes it into a central cleaning system nearby and then pushes the gas into pipelines where it can be used at a plant more than 100 miles (160 kilometers) away to generate power.