Northrop Grumman has agreed to pay nearly $5 million for the massive government computer meltdown last summer that left several Virginia agencies unable to handle citizen requests for days.

The defense giant also will implement a series of improvements that address the findings and recommendations of an independent third-party audit.

The outage, which was a result of both technological and human errors, left 26 state agencies, including the Department of Motor Vehicles, scrambling to serve Virginians

“We are committed to holding all state contractors accountable for the performance of their duties on behalf of the commonwealth and its citizens,’’ Gov. Bob McDonnell (R) said in a statement. “This agreement brings closure to this incident, and provides the commonwealth with an improved information technology infrastructure that will reliably support Virginia’s citizens and agencies in the years ahead.”

“We are pleased to have reached an agreement with the Commonwealth regarding the disruption caused by the August 2010 outage,’’ said Christy Whitman, a Northrop Grumman spokeswoman. “In partnership with VITA, we are implementing new procedures, policies and safeguards to help avoid similar occurrences. Northrop Grumman’s commitment to the Virginia Information Technology Partnership is resolute and we look forward to continuing to work in the best interest of the Commonwealth and its citizens.”

Secretary of Technology Jim Duffey, who negotiated with Northrop Grumman on behalf of the state, said the financial package includes monthly invoice credits over the next 24 months totaling $1.908 million — representing the entire amount of direct costs incurred by the state as a result of the disruption.

Northrop Grumman also will spend $2.09 million making operational improvements to database backup, storage systems, system monitoring, database monitoring, network monitoring and capacity management; the company will also pay for $750,000 in improvements and $250,000 for the audit.

“I am satisfied that Northrop Grumman has been held accountable and that the Commonwealth has been made whole,” Duffey said. “This compensation package will benefit all agencies impacted by the outage and enhance the state’s information technology infrastructure.”

McDonnell, who had criticized his predecessor, Timothy M. Kaine (D), for failing to properly manage the Northrop Grumman contract, pledged to run such programs as businesses.

McDonnell’s solution was to rework the state’s contract with Northrop Grumman, extending the 10-year agreement by three years and agreeing to pay the company $100 million more than originally envisioned, but adding new penalties for poor service.

Then-governor Mark R. Warner (D) proposed consolidating the state’s computer operations into one agency and overhauling the system after a legislative review in 2002 found that the state’s computer system was outdated and increasingly expensive to maintain. The General Assembly, then controlled by Republicans, approved.

The state accepted bids and selected Northrop Grumman, the giant Los Angeles-based defense company for the contract, the largest of any kind in Virginia history. But the contract has been plagued by problems from the start, including missed deadlines and poor service.

A blistering legislative audit released in 2009 found that the computer system had caused problems at almost every state agency that uses computers.