When Goldman Sachs Group Inc. arranged an $835 million loan to Banco Espírito Santo SA last summer, it was the result of a concerted, monthslong effort by senior Goldman officials to win business with the large Portuguese company, according to people familiar with the matter.

Today, Goldman’s embrace of Espírito Santo has come back to haunt the Wall Street giant. Weeks after Goldman arranged the loan, Banco Espírito Santo collapsed amid allegations of fraud. Goldman now is in an unusual public fight with Portugal’s central bank, which bailed out Espírito Santo, over whether the loan should be fully repaid. Anticipated losses linked to the loan took a bite out of Goldman’s already weak fourth-quarter results, the firm’s executives said last week.

And the Goldman loan is under review by Portuguese regulators, which are trying to untangle the web of financial arrangements surrounding Banco Espírito Santo at the time of its implosion, a person familiar with the inquiry said.

The situation highlights a series of missteps by the Wall Street bank.

The loan was approved by at least three Goldman committees, which are composed of senior bank executives and are designed to rigorously assess transactions for their credit risk and their potential to harm the bank’s reputation, according to people familiar with the matter. And the Bank of Portugal moved the loan toward the back of the line for repayment because Goldman last summer briefly amassed more than 2% of Banco Espírito Santo shares.