The man who bought two rifles that terrorists used to kill 14 people in a 2015 terror attack in San Bernardino, California, was sentenced Friday to 20 years in prison.

Enrique Marquez Jr., 28, supplied the rifles used by his friend Syed Rizwan Farook and Farook’s wife, Tashfeen Malik, to open fire on a meeting and holiday gathering of San Bernardino County employees who worked with Farook.

After killing 14 people and wounding 22 others on Dec. 2, 2015, the couple died in a gunbattle with authorities.

FILE - This Dec. 17, 2015 file courtroom sketch shows Enrique Marquez Jr, in federal court in Riverside, Calif.   Marquez Jr. who bought two rifles that a husband and wife used to kill 14 people in a California terror attack is expected to be sentenced.  He is scheduled to appear in federal court Friday, Oct. 23, 2020 in Riverside. Nearly five years have passed since an acquaintance of Marquez opened fire on a meeting in nearby San Bernardino with weapons Marquez previously bought for him. (Bill Robles via AP, File)

FILE - This Dec. 17, 2015 file courtroom sketch shows Enrique Marquez Jr, in federal court in Riverside, Calif. Marquez Jr. who bought two rifles that a husband and wife used to kill 14 people in a California terror attack is expected to be sentenced. He is scheduled to appear in federal court Friday, Oct. 23, 2020 in Riverside. Nearly five years have passed since an acquaintance of Marquez opened fire on a meeting in nearby San Bernardino with weapons Marquez previously bought for him. (Bill Robles via AP, File)

The sentencing in federal court in Riverside came after families of the victims pleaded with a judge to give Marquez a lengthy sentence. Prosecutors had asked for a 25-year sentence and Marquez’s attorney had suggested five years.

Marquez has a high IQ and the mental capacity to understand the likelihood of an attack occurring once he bought the weapons, prosecutor Melanie Sartoris said.

“He knew all along that this would happen,” but he did nothing, Sartoris said.

FILE - This undated combination of file photos provided by the FBI, left, and the California Department of Motor Vehicles shows San Bernardino shooting suspects Tashfeen Malik, left, and Syed Farook. Enrique Marquez Jr.  who bought two rifles that a husband and wife used to kill 14 people in a California terror attack is expected to be sentenced.  He is scheduled to appear in federal court Friday, Oct. 23, 2020 in Riverside.   (FBI, left, and California Department of Motor Vehicles via AP, File)

FILE - This undated combination of file photos provided by the FBI, left, and the California Department of Motor Vehicles shows San Bernardino shooting suspects Tashfeen Malik, left, and Syed Farook. Enrique Marquez Jr. who bought two rifles that a husband and wife used to kill 14 people in a California terror attack is expected to be sentenced. He is scheduled to appear in federal court Friday, Oct. 23, 2020 in Riverside. (FBI, left, and California Department of Motor Vehicles via AP, File)

Defense attorney John Aquilina argued in court that his client had no knowledge of what was going to happen.

“Mr. Marquez’s sentence should not be reflective of what happened in San Bernardino,” he said.

Prosecutors contend Marquez must be held responsible for his actions, which include giving semiautomatic weapons and explosives to a person he knew was inspired by violent extremists and plotting with him to kill large numbers of people.

FILE - In this Dec. 7, 2015, file photo, San Bernardino County employees hold up photos of the San Bernardino shooting victims during a candlelight vigil in San Bernardino, Calif. Enrique Marquez Jr.,  who bought two rifles that a husband and wife used to kill 14 people in a California terror attack is expected to be sentenced.  He is scheduled to appear in federal court Friday, Oct. 23, 2020 in Riverside.   (AP PhotoJae C. Hong, File)

FILE - In this Dec. 7, 2015, file photo, San Bernardino County employees hold up photos of the San Bernardino shooting victims during a candlelight vigil in San Bernardino, Calif. Enrique Marquez Jr., who bought two rifles that a husband and wife used to kill 14 people in a California terror attack is expected to be sentenced. He is scheduled to appear in federal court Friday, Oct. 23, 2020 in Riverside. (AP PhotoJae C. Hong, File)

“And the undeniable truth remains: If defendant had not illegally purchased two assault weapons for a terrorist, that terrorist and his wife would not have used those firearms to murder 14 people and wound 22 survivors,” prosecutors wrote in a court filing.

The government contends that several years before the massacre, Marquez and Farook had plotted two terrorist attacks on Riverside City College and a local highway, State Route 91.

But Marquez abandoned the idea and distanced himself from Farook in 2012 after three other Southern California men were arrested on suspicion of planning to go to Afghanistan to kill U.S. troops. Eventually, the three and a fourth man were sentenced to federal prison for conspiracy.

Marquez's defense attorney said his client had been manipulated by Farook since he was 13, when they met as neighbors. Aquilina said Marquez was desperate to socialize with others and needed to escape verbal and physical abuse at home.

Marquez had stopped speaking to Farook years before the attack, Aquilina said.

Marquez was arrested soon after the shooting and described to the FBI his research into terror attacks, purchase of explosives and the plans he made with Farook, the government said.

Marquez pleaded guilty in 2017 to conspiring with Farook to provide material support to terrorists and making false statements regarding the rifles he had purchased in his name using Farook’s money.

He later tried to withdraw his plea to one of the counts, but the request was denied by the court.