An Oregon man has been detained for a mental health evaluation after appearing in federal court Tuesday to face charges that he threatened to kill President Obama and the president's family.

The Secret Service arrested Darryl James Swanson, of Portland, on Friday. Prosecutors say Swanson made threats in numerous phone calls to federal prosecutors' offices in Oregon and Washington, a county government office in Florida, and The Associated Press.

Assistant U.S. Attorney Stephen Peifer told a federal judge in Portland that he considered Swanson, 45, a flight risk and a safety risk. Swanson's arraignment was set for next month, when he'll enter a plea.

"I do consider him to be a threat to the community," Peifer told the AP afterward.

According to the criminal complaint, Swanson made threatening calls to a series of government offices, including three to the county commissioner's office in Palm Beach County, Fla., 44 voicemail messages left June 19 with the U.S. attorney's office in Portland, and three calls to the U.S. attorney's office in Seattle on June 30. He was arrested the following day.

He also had called the AP bureau in Seattle on May 2, prosecutors said, leaving a message that said he would seek weapons to shoot the president and his family.

"I may have to get in touch with al-Qaida and get a hold of at least one, possibly two good working machine guns and blast my way into the White House," the voicemail said.

The AP told the U.S. attorney's office and the Secret Service about the call.

The day after the call to the AP, Swanson told Secret Service agent Ronald Brown that he made the call because he was frustrated that the president has not sent him a check for $70 million, which he claims he is owed from a trust fund set up at his birth, court documents show. Brown told him that no trust fund exists.

The Secret Service did not find weapons in Swanson's apartment and warned him not to make threats against the president. But authorities say he continued leaving the angry and threatening messages at the government offices.

In court Tuesday, Swanson consented through his public defender to a mental health evaluation.

Mert Rockney Jr., who described himself as a friend of Swanson's family, said the defendant has struggled with his mental health for more than a decade.

"Darryl's harmless," Rockney said. "He just needs to have someone to intervene with him so he takes the right medication."

Secret Service spokesman Max Milien said the agency doesn't comment on threats made against the president.