Letitia James, the attorney general of New York, announced a settlement on Wednesday with Devumi, a company that sold hundreds of millions of fake followers on Twitter and other social media platforms before going out of business last year.

The settlement is one of the first major efforts by regulators and law enforcement officials to investigate the shadowy market of social media fraud, where armies of fake accounts are sold to businesses, politicians and celebrities seeking the appearance of influence.

Ms. James’s investigation was prompted last year by a New York Times report that detailed how Devumi — then based in Florida — had earned millions of dollars peddling fake accounts to customers in New York and other states. Many of the accounts, known as bots, borrowed likenesses and personal details from real people, helping them avoid detection and deletion by Twitter.