A man who the authorities say fatally shot five people and wounded six others at an airport in Fort Lauderdale, Fla., last year has agreed to plead guilty to several counts of committing violence in a deal that allows him to avoid the death penalty, according to documents filed in court on Monday.

Prosecutors said that the man, Esteban Santiago, would plead guilty to 11 counts related to violence at Fort Lauderdale-Hollywood International Airport and would serve five consecutive life sentences, followed by 120 years in prison for the shooting rampage on Jan. 6, 2017.

As part of the agreement, Mr. Santiago, 28, also waived his right to appeal and agreed to forfeit a pistol that he used in the shooting, the documents say. In exchange for the plea, prosecutors agreed to drop the remaining 11 counts of the indictment filed last year.

A competency hearing is scheduled for Wednesday, though it appears possible that it could turn into a plea hearing at which the deal would be completed.