SAO PAULO, April 8 (Reuters) - A Brazilian appeals court ruled on Monday that Banco BTG Pactual SA could attempt to hire away independent brokers associated with the country's largest investment firm XP Investimentos SA, a source with knowledge of the matter said.

XP filed a lawsuit against BTG in December, seeking to bar BTG's new digital platform from poaching its brokers, in a move that BTG slammed as anti-competitive.

XP accused BTG of using inside information gained while it was managing the investment firm's initial public offering in 2016 to build its own platform. BTG was among a group of investment banks hired to manage an IPO that was canceled.