RAPID CITY, SD — The Federal Communications Commission on Monday gave Pandora Media permission to buy a small radio station in South Dakota, bringing to an end one of the company’s more contorted fights with the music industry. In June 2013, when Pandora, an Internet radio service, reached a $600,000 deal to buy KXMZ-FM in Rapid City, S.D., the company said that owning a terrestrial station would give it access to industry deals for cheaper songwriting royalties. Pandora, which competes with radio stations for listeners and advertising, has long complained that it pays much more in total royalties than radio stations do. Brian McAndrews of the Internet radio giant Pandora, which has antagonized musicians by pushing for lower royalty rates. Brian P. McAndrews, the chief executive of Pandora. Music industry groups quickly objected to the proposed deal, however, calling Pandora’s move a “stunt.” Ascap, one of the major music licensing agencies, asked the F.C.C. to block the transaction, citing federal laws that prevent companies from acquiring broadcast licenses if more than 25 percent of their shares are owned by foreigners. Pandora, which has been publicly traded since 2011, argued that it had no way of knowing who owned its stock. In its ruling on Monday, the F.C.C. rejected Ascap’s opposition and said that “it would serve the public interest to permit a widely dispersed group of shareholders” to own shares in Pandora. The F.C.C. still needs to formally approve the sale. The fight over KXMZ was just one area in which Pandora has clashed with the music industry over royalty rates. Last year, it prevailed in a federal lawsuit with Ascap over songwriting rates, and it is awaiting the judge’s ruling in a similar case against BMI, another large licensing group. Pandora is also facing off against recorded-music groups before the Copyright Royalty Board, a panel of federal judges. Pandora has 79 million regular users and last year had $921 million in revenue. In a statement on Monday, Pandora said the deal for KXMZ “makes sense to us beyond the licensing parity alone,” adding that it would apply its data on music listening habits to Rapid City, “where over 42,000 residents already use Pandora.” According to Nielsen, the Rapid City market includes 114,000 people age 12 and over.