Ephonia Green, who earned $56,000 a year at the District-based AAMC, which administers the test known as the MCAT that is used in medical school admissions, pleaded guilty in U.S. District Court to carrying out the theft over an eight-year period.

“Her lucrative and long-running scheme came crashing down when her employer discovered her deception and informed law enforcement,” U.S. Attorney Ronald C. Machen Jr. said in a statement released after the hearing. “She now faces years in prison as a result of the millions she stole for her own self-indulgence that were initially intended to benefit educational programs.”

Green, speaking softly and clutching a handkerchief as she answered questions from Judge Beryl A. Howell, did not provide any insight into her motivations. Her attorney, William C. Brennan, told the judge that Green is seeing a counselor to help her come to terms with her misconduct.

“We are truly stunned,” Darrell G. Kirch, the AAMC’s president and chief executive, said in a statement that referred to Green as a “long-time, trusted employee.”

The organization also said it would “apply the lessons we have learned from this experience, as well as share them with others in the nonprofit community.”

Green, 44, started at the association that represents accredited medical schools and major teaching hospitals in 1998 and initially worked in support positions. Court documents signed by Green describe how she opened bank accounts in the names of companies that closely resembled those of legitimate vendors to the AAMC.

With access to the organization’s key financial systems, Green created phony invoices in the names of legitimate groups and then approved them for payment. The checks were returned to Green — not to the vendors — and deposited into the accounts she created. Green also issued invoices for payments to a bridal shop she owns in Upper Marlboro and later failed to list them in her unit’s budget records.

Frank Trinity, the AAMC’s chief legal officer, said that Green had “exploited every gap in their system” and used “deception and coverup.” Outside auditors reviewed the group’s balance sheets, but those were not forensic audits aimed at detecting fraud, the association said.

Trinity acknowledged weaknesses in oversight and said the association has corrected them. As an administrative assistant, Green had sole sign-off power on invoices up to about $20,000. Dual sign-offs, by people at higher levels, now are required for all invoices. Monthly budget reviews add additional monitoring.

Trinity said some of the largest payments Green stole — accounting for more than $3.7 million — purportedly were for the Brookings Institution. He said they went unchallenged because Brookings is a trusted name.

Green’s scheme started small but dramatically escalated, according to a log of checks filed as part of the plea agreement she signed. Between July 2005 and September 2006, the checks Green cashed were nearly all for less than $5,000.

She became more brazen — for example, taking nearly $218,000 between January and April 2009 through just four checks, each for more than $50,000, according to court papers.

Starting in 2011, nearly $1.4 million was paid through 74 checks made out to the bridal business that Green ran on the side, known as Couture Miss Bridal & Formal. She took $27,200 for the bridal shop in a single day in November 2012, according to court papers.

The scheme fell apart in July, when a bank withheld payment on a $113,000 check that did not match the name on a bank account Green had set up two days earlier. The bank alerted the association, and it fired Green that month. The AAMC informed federal authorities and hired an outside attorney and forensic accountants.

A Washington Post analysis last month of federal disclosure records filed by nonprofit groups across the country revealed more than 1,000 “significant diversions” of assets at such organizations. Many of the diversions identified by The Post were described as acts of theft and fraud carried out by insiders, contractors and investment advisers.

As part of the plea, Green has agreed to repay $5.1 million to the association. The money will come in part from the sale of her $1.1 million home in Upper Marlboro that she owns with her husband, Albert J. Green Jr., and her mother-in-law. In addition, Green’s attorney said she has agreed to sell her bridal business.

Prosecutors did not provide a complete picture of how Green spent the money she embezzled. According to the association, Green purchased a condominium, a time-share and an Acura MDX, in addition to the 7,000-square-foot home in Prince George’s County.

Under federal sentencing guidelines, Green faces up to 51 months in prison. A sentencing hearing is set for Feb. 28.