Under a settlement reached Thursday between the Prince George’s County school district and the U.S. Department of Labor, 161 teachers recruited from overseas will lose their jobs when their visas expire within two months, and hundreds more terminations are likely to follow in the next two years.

Prince George’s will be required to pay $4.2 million in back wages to more than 1,000 teachers recruited from foreign countries under the agreement with the Department of Labor.

The settlement comes after the county appealed a federal finding in April that the district had willfully violated the law in its overseas hiring practices. The district will be forbidden from requesting new visas or extensions of current visas for teachers for two years.

“Obviously, this is not the outcome we had hoped for,” Superintendent William R. Hite Jr. said. “These employees have provided exceptional commitment and dedication to our district.”

The school system will also have to pay an additional $100,000 penalty because of the “willful nature” of its violations, a significant reduction from the $1.7 million fine that the federal government imposed in April.

The federal investigation was triggered when a teacher reported in 2007 that the school system was illegally charging teachers for their visa applications and other fees. The teachers, recruited mostly from the Philippines, typically used their own money to pay a $500 anti-fraud fee to the Department of Homeland Security, as well as a $1,000 attorney’s fee and a $3,500 placement fee, among other expenses, the investigation found in April. Under federal law, the school district should have paid those fees.

The district appealed the decision, and Hite maintains that officials did not knowingly violate the law. But he said the cash-strapped district, which laid off 200 teachers this year to close a budget gap of about $155 million, could no longer afford to fight its appeal with the Department of Labor, nor could it continue operating a fee-laden overseas recruitment program.

The settlement must be approved by an administrative law judge.

The decision closes down what had become a major pool of teachers for Prince George’s. Recruiters for the district began looking abroad for teachers who could meet federal requirements for teacher quality in 2005. By last year, the foreign workers constituted more than 10 percent of the workforce.

Nationwide, there were more than 19,000 foreign teachers working in U.S. schools on temporary visas in 2007, according to a report by the American Federation of Teachers, a teachers union. The federal government is investigating similar infractions in other school districts.

“The Labor Department has the responsibility for ensuring that employers who use the H-1B program follow the law and do not place U.S. workers at a disadvantage to H-1B workers,” Secretary of Labor Hilda L. Solis said in a statement. “We are pleased this investigation has been resolved with workers paid all the back wages to which they are entitled.”

For many foreign teachers in Prince George’s, a few thousand dollars in back pay is little consolation for losing their jobs and their prospects for staying in the United States.

“We did not come here and steal jobs,” said Maria Ariston, a teacher at Apple Grove Elementary in Fort Washington. “They came to Manila to recruit us.”

Ariston was among the first to be hired in 2005 from the Philippines. She was attracted to the job, she said, in large part because she was told that the H-1B work visa could lead to a green card. So she and her husband moved to Maryland and started a family here.

Since she arrived, she has earned a master’s degree in education and certification in special education and teaching English as a second language, two hard-to-staff areas. But when her visa expires next year, the school system can do nothing to help her stay and work.

The school district’s mistakes in recruiting have “cost us so much,” she said.

“Now where do we go?” she said. “Where do we go?”