SACRAMENTO — A California man who told undercover agents that he wanted to carry out a Christmas Day bombing at San Francisco's popular Pier 39 was sentenced to 15 years in prison.

U.S. District Judge Lawrence J. O'Neill issued the sentence Monday, which came after Everitt Aaron Jameson of Modesto, California, admitted under a plea deal in June that he tried to aid a terrorist organization.

Jameson, 27, planned the attack during talks with undercover FBI agents, including one he thought was with the Islamic State group.

Court documents show that Jameson joined the Marine Corps and received basic training, but he was discharged for failing to disclose an asthma history.

The former tow-truck driver told undercover federal agents that he planned to use pipe bombs to channel victims into part of Pier 39 so he could shoot them. He also offered to provide money to the cause.

Jameson could have received 40 years in prison.

Defense attorney Charles Lee has said his client was having second thoughts and didn't take steps to carry out the plot. Investigators found no bomb-making materials, and three firearms found during a search were owned by his stepfather and locked away in a place he couldn't access.

Jameson was arrested Dec. 22.