JOHANNESBURG, June 2 (Reuters) - South Africa's central bank governor Lesetja Kganyago said on Tuesday that the bank would bring inflation back ​to its 3% ⁠target, defending last week's rate hike as necessary to prevent second-round effects from ‌the Middle East oil shock from becoming entrenched.

The South African Reserve Bank raised ​its key repo rate by 25 basis points last Thursday, to 7%, with four out ​of six Monetary ​Policy Committee members backing the decision.

South Africa's inflation climbed to 4% in April from 3.1% in March, sitting at the upper ⁠end of the central bank's target range.

The SARB, which targets inflation at 3% with a 1-percentage-point tolerance band, raised its inflation forecasts to 4.4% and 3.7% for 2026 and 2027 respectively.

Africa's most industrialised economy is a net ​oil importer and has ‌seen large ⁠price hikes on ⁠the back of the Iran war, which has pushed inflation higher, despite a modest government intervention ​on the fuel levy to cushion the full ‌effect of the price increases.

The governor said second-round ⁠effects from the oil shock -including spillovers to food prices from higher diesel and fertiliser costs - were developing and needed to be tackled. The bank is projecting core inflation of around 4% in the first half of next year.

Kganyago warned that inflation expectations could quickly edge higher as price setters have a fresh memory of elevated inflation, adding that raising rates now was a move to counter that risk.

"By changing rates, we hope to send ‌a clear and credible signal that we will keep inflation under ⁠control," Kganyago said in a speech to economists in ​Johannesburg, warning that the bank would not allow a price spiral to take hold at the expense of the most vulnerable.

Kganyago firmly ruled out reverting to ​the old ‌3–6% inflation target band.

The next inflation expectation survey will ⁠be released at the end of ​June.