The city shall have power, insofar as the exercise thereof shall not conflict with or contravene the provisions of law, to acquire such an interest in any premises within the city, by purchase at any tax or other public sale, or by direct purchase from or negotiation with the State of Michigan or the fee owner, as may be necessary to assure to the city the collection of its taxes, special assessments or charges which are levied against any lot or parcel of real property or to protect the lien of the city therefor, and may hold, lease, sell, or exchange the same. Any such procedure exercised by the city to assure the collection of its taxes or the protection of its tax or other liens shall be deemed to be for a public purpose. The council may adopt any ordinance which may be necessary to make this section effective.