pay off the loan immediately, and invest the leftover like you would normally. A loan due in 9 months is not something you want to fuck around with, just get rid of it and move forward without having that hanging over your head.
Otherwise, if you don't want to pay off the loan yet (0% intro rate on a cc, maybe), put it in a high interest savings account until you need it. Or save half and invest half, whatever. But I wouldn't invest the whole thing, not when you'll need the full amount so soon.
What was your plan to pay off the loan before getting this unexpected windfall? Would you have been able to save enough cash yourself to pay it off by Oct?