The U.S. Department of Justice and the Federal Communications Commission announced a civil settlement with Hewlett-Packard Co in relation to alleged E-rate fraud.

Under the settlement, HP will pay the government $16.25 million, most of which will be returned to the E-rate program, FCC said in a statement.

The E-rate program, which funds Internet connections in schools and libraries, has brought Internet connectivity to virtually every classroom in the country.

The FCC and DoJ investigated allegations that contractors working with HP and other companies lavished gifts on certain school districts to get contracts, which included HP equipment.

The FCC said it had negotiated a compliance agreement with HP that will ensure the company plays by the rules in the future.