The benchmark Stock Exchange of Thailand (SET) composite index ended up 9.38 points at 617.07, its highest close since August 5 and the big-cap SET 50 rose 1.58 percent to 42.56 points.
Turnover was 21.7 billion baht ($521 million), up from Wednesday's 15.96 billion baht.
Standard & Poor's Ratings Services raised its long-term foreign currency sovereign credit rating on Thailand to "BBB+" from "BBB" and fund managers said that should persuade foreign investors to buy Thai stocks again.
S&P raised its long-term foreign currency ratings to "BBB+" from "BBB" on state-owned energy firm PTT PCL, which rose 0.7 percent to 151 baht and on PTT Exploration & Production PCL, which fell 0.7 percent to 288 baht.
Analysts attributed the fall of PTTEP shares to expectations that Indian Oil Corp may not buy stakes in Indonesian oil and gas firm Medco from PTTEP and Credit Suisse First Boston because they were too expensive.
Buying momentum should continue on Friday, when resistance on the main index would be at 620 points and support at 605-610 points, said Bualuang Securities analyst Chaiyaporn Nompitakcharoen.
Easing oil prices would attract investors to buy stocks as well, he said as US light crude for October traded at $43.7 a barrel at 0937 GMT.
Investors drove bank shares up 1.5 percent as they expected banks, net lenders in the repurchase market, to benefit from the central bank's increase of its benchmark 14-day repurchase rate, SCB Securities analyst Adipong Puttarawigorm said.
The central bank raised the rate by 25 basis points 1.50 percent on Wednesday in an expected move analysts said could shore up the baht and help ease the impact of high oil prices.
Bangkok Bank shares rose 1.6 percent to 93 baht and Siam Commercial Bank shares rose 1.6 percent to 46.75 baht.
Kiatnakin Finance, the number three finance firm, rose 1.7 percent to 29.5 baht, easing from a two-week high of 30 baht after the firm said it planned to spend up to 1.5 billion baht to buy back its shares following a recent drop in price.
Thai Airways International surged 4.5 percent to 52 baht after the national carrier said it expected average annual revenue growth of nine percent over the next five years, during which it plans to buy 14 new aircraft.