A county and a city may agree that the county shall construct, repair or maintain designated county highways, or portions thereof, within the unincorporated territory of the county, the cost thereof to be paid in whole or in part by the city to the county.