不得已而为之

bù dé yǐ ér wéi zhī

to have no other choice

to be the last resort

no; not so

to obtain

already

ér

and

wéi

variant of 為|为[wei2]

zhī

(possessive particle, literary equivalent of 的[de5])