DUBLIN -- Four Bay Area residents have been charged in an alleged insider trading scheme that resulted in collective profits of more than $12 million, federal authorities said Friday.

Saleem Khan was regularly tipped off with confidential monthly sales figures by his friend Roshanlal Chaganlal, who was a director in the finance department of Ross Stores, the Securities and Exchange Commission said in a statement.

The SEC alleges Khan used the information to illegally trade securities on more than 40 occasions before the Dublin-based company's public release of its financial information. He is also accused of sharing the illegal information with his colleagues Ammar Akbari and Ranjan Mendonsa so they could trade in Ross stock options.

The activity continued from 2009 until 2012, when Chaganlal was fired from his job at Ross, the SEC said.

"Khan and Chaganlal took advantage of confidential company data to systematically trade in Ross securities and reap millions of dollars in profits," said Jina Choi, director of the SEC's San Francisco regional office. "Even when insider traders try to conceal their profits and kickbacks by using other accounts and intermediaries, we're committed to piecing together these widespread schemes and catching the perpetrators."

Reuters, attributing the information to the SEC, reported that Khan, Chaganlal and Akbari live in Dublin; Mendonsa is from San Ramon.

Khan's lawyer, Christopher Cannon, questioned the solidity of the case against his client.

"It's a very aggressive complaint because Saleem Khan made hundreds of winning trades and hundreds of losing trades in Ross Stores over the time period alleged. If he was trading on insider information, why does he have so many losing trades?"

Khan brought $5.4 million into his own account and $6 million into the account of a brother-in-law, the SEC said, while Mendonsa made about $800,000 and Akbari made $2,000. Authorities also claim Khan separately made about $450,000 by using insider information to trade stock options of Dublin-based software company Taleo.

Akbari's lawyer, Brian Berson, said, "Mr. Akbari is not guilty of insider trading."

As evidence, he pointed to the SEC's concession that his client had received just $2,000, less than 2 percent of the total profits that authorities allege were made.

"It was a small portion of his portfolio," Berson said.

Lawyers for Chaganlal and Mendonsa didn't immediately return messages seeking comment.