Tesla Motors Inc. announced late Wednesday that Goldman Sachs Group Inc. GS, +0.01% is one of the lead book runners on the electric-car maker’s $2 billion secondary offering of shares.

That news arrived just hours after Goldman analysts upgraded the stock to buy, predicting that Tesla TSLA, +4.42% would need to raise about $1 billion from capital markets to be able to fuel its expansion. That includes making 500,000 vehicles a year by 2018 and getting its mass-market all-electric sedan, the Model 3, off the factory floor by late next year.

While secondary stock offerings aren't subject to the same blackout period that prevents investment banks from publishing research on a stock during an initial public offering, the timing of the two announcements looks uncomfortably close.

Investment banks are obliged to keep a “Chinese Wall” between their research and investment-banking teams to avoid any potential conflict of interest. Goldman said it has fully complied with that rule.

“Our research is independent,” the bank said in emailed comments. “We followed all of our standard policies and procedures with respect to our research publication on Wednesday.”

Tom Gorman, a partner at law firm Dorsey & Whitney LLP and former lawyer for the Securities and Exchange Commission, said the timing of the two announcements is likely a coincidence, although he acknowledged the appearance is troubling.

“The whole question of research overlapping with investment banking has long been a hot topic and one that is regularly looked at by the SEC,” he said. “I would fully expect that Goldman has such policies in place.”

Goldman has worked hard in recent years to improve its reputation, which was battered by the 2008 financial crisis and Rolling Stone magazine’s infamous description of the bank as a “vampire squid wrapped around the face of humanity.”

Chief Executive Lloyd Blankfein has become a regular fixture on financial TV and at conferences as the bank strives to present itself in a warmer light.

But that hasn’t stopped it from being the poster child for corporate villainy, with the name popping up regularly in the presidential campaigns of both political parties as a term to describe the dark side of boardroom politics.

Twitter Inc. users responded to the two developments with a mix of acrimony and sass:

Morgan Stanley MS, -0.33% is the deal’s co-lead with Goldman, with Deutsche Bank AG DB, -1.62% , Citibank C, -1.47% and Bank of America Merrill Lynch BAC, -0.55% acting as joint book-running managers.

Read more:Tesla bears are alive and well

Tesla said it would offer about $1.4 billion worth of shares, with the remaining shares to be sold by Chief Executive Elon Musk to cover tax obligations associated with his exercising of more than 5.5 million stock options. Musk will also donate 1.2 million shares to charity. The company didn’t specify the charity recipients.

Tesla shares fell more than 3% right after news of the secondary offering, but the stock was nearly flat as trading wore on. The stock ended the regular trading day up 3.2%.