In teamplay, if I take a city nearer an ally, sometimes we gift it to them. I once gifted a city to an AI ally (the player had quit) because I could not stand the economy especially so far from home, but wanted pyramids. We 2 (was an inland 3v3) won.
Also, it happened to me the other day. I had a civ choked at 1 city in a 3v3, and suddenly he had a 2nd city and axemen. Apparently, a teamate donated a city to him (no way any unit entered his cap fat cross) and began gifting him axes at that city. This divided their workload, and I got overrun (lost 1 of my 2 cities after burning his 3rd city) but rebuilt and held. Fortunately, our 2man effort on the other front completely overran them.