* BPI net profit up at 41.6 million euros
* Increase mostly thanks to last year's market loss
* Net interest income drops (Recasts with third quarter, adds analyst)
LISBON, Oct 22 (Reuters) - Banco BPI, Portugal's third-largest listed bank, on Thursday posted a 64 percent rise in its third-quarter net profit mostly due to year-ago market losses on some assets, but its margins shrank in a weak economy.
It said net profit rose to 41.6 million euros ($62.28 million) -- slightly exceeding the market's consensus of 37 million euros.
Last year, the bank's net profit was affected by losses booked on its stake in rival Millennium bcp. The stake has since been sold. BPI said that, when adjusted to exclude extraordinary items like the Millennium stake, year-ago profit would have totalled 44.9 million euros, being 7 percent above last quarter's.
The bank's net interest income -- the difference between interest paid on deposits and interest charged for loans -- fell 17 percent to 138 million euros from the same time of last year, compared to 147 million euros expected on average by analysts.
"The results were hardly surprising and little different from the preceding quarter. We'd have to wait for the next quarter to see any improvements," said one Lisbon-based banking analyst who did want to be named.
"Trading margins, especially on major financial operations in Angola, were a positive surprise though. On average in the last few quarters trading margins were 7-10 million euros, but last quarter it was 38 million in Angola alone," the analyst said.
In the first nine months of the year, overall costs rose 2.5 percent, BPI said. Clients' deposits increased 2.2 percent by 600 million euros, while loans to clients increased 0.9 percent, mostly thanks to the bank's Angolan operations.
BPI's Core Tier 1 capital ratio was 8.1 percent at the end of September.
BPI stock fell 1.19 percent to close at 2.5 euros before the results were announced, while the broader market in Lisbon finished 1.4 percent in the red. (Reporting by Andrei Khalip and Filipa Cunha Lima; Editing by Rupert Winchester)