BRIDGEPORT — The town of Fairfield has agreed to pay $2.1 million to the family of a Brazilian house cleaner who suffered a brain injury when her bicycle tire got caught in a road grate.

As a result of her injury, 34-year-old Rubia Rodriguez cannot speak or walk and must be cared for by her family, said her lawyer, Jonathan Perkins.

“They will now have the funds to support their daughter,” he said.

The settlement was reached as the civil case was about to be presented to a jury in state Superior Court here.

Lawyers for the town did not immediately return calls and emails for comment.

On Sept. 7, 2015, the then 31-year-old Rodriguez was riding a bicycle on Morehouse Road with her boyfriend, according to the lawsuit. Rodriguez, who was not wearing a helmet, was riding down a hill near the entrance to Lake Mohegan when the front tire of her bicycle became trapped in a catch basin grate causing her to fly over the handlebars and land on her head on the street.

Perkins said Rodriguez was taken to St. Vincent’s Medical Center suffering from a traumatic brain injury. He said she spent six months in the hospital before her family, who could no longer afford her treatment here, had her flown back to her native Brazil.

“She is going to be bedridden for the rest of her life,” Perkins said.

The bars in the grate Rodriguez hit are six inches apart; Perkins said the state Department of Transportation had recommended that all municipalities replace them with grates that have bars four inches apart to avoid similar incidents.

“But many municipalities have been slow to replace these grates, including Fairfield,” Perkins said.

In court filings, the town’s lawyers argued there were no witnesses or evidence Rodriguez’s bicycle wheel hit the grate.