So you wake up one day and you realize something – you’re about to be leader of a country. For a long time, some foreign power’s been running the show, but they’re about to skip town and leave you to your devices. Never mind how you got there – your idiosyncratic journey doesn’t change the challenges ahead.

Your former overlords haven’t done much for you, either, in regards to setting up government, schools, hospitals, etc., and when they drew the borders of your country they didn’t ask any of the locals. Your so-called “people” are a mass of individuals with little to no notion of commonality and who are only dimly aware there’s something called a “capital” with a “leader.” For them, the city you reside in is just the biggest place where they can occasionally go and exchange goods before returning to their real lives in the hinterland. What happens there and who claims control is more or less irrelevant to them.

But that’s all about to change. You’ve got problems – and you intend to tackle them head on.

Problem number one: Fending off the neighbors

Your now-departed masters had some form of colonial administration and defense force, but never had to put too much effort into guarding borders because the entire neighborhood was run by fellow imperialists whose strategies for domination involved large armies back home but just picket forces abroad. While some native-run kingdoms and states did exist nearby, all of them knew that the best way to stay decolonized themselves was to avoid picking fights with imperial powers who had access to superior technology and militaries. But those days are gone and you’re left with whatever gendarme or colonial scouts the colonizers left.

You’ve got two options to preserve your borders – build up a native-run military force capable of defending yourself or ally yourself with some foreign power that’s willing to do that for you. The former takes time, decades even, to properly train an officers corps professional enough to do the job while also amassing the proper equipment that can go toe-to-toe with neighbors. The easiest route is to have a ‘special’ relationship with your former colonizer – but failing that, you could always do with running to your colonizer’s greatest adversary, who’ll relish the opportunity to win a new friend at their expense.

In the real world, most decolonized nations secured themselves by entering into good relationships with their former masters. Canada, Kenya, and in fact most British colonies did just this and were kept safe by Britain’s military. Many other colonies did this too, but those that didn’t either jumped into some enemy’s camp (like Vietnam and Algeria, who in various ways aligned with the Soviet Union) or struggled against their neighbors (like Congo and antebellum United States).

Problem number 2: establish internal security

It was way easier to get your borders set than to buy off all the rival groups within them. None of your people had ever been asked about colonization to begin with, let alone where the capital was going to be and who was going to be in charge of it. Your colonial masters probably divided and conquered their way to control or, in some cases, just replaced natives wholesale with their own. In either case, you’ve got to ensure everyone knows who’s in charge.

You’ll need to choose some kind of power base. The best ones will be those educated and trained in imperial capitals or, failing that, are part of some existing social structure. They’ll probably be elitist and rich and will want to stay that way, so you’ll have to set up a bargain whereby that continues. This will help neatly divide your country into a Rich vs. Poor dynamic, which is a lot easier to manage than the immediate alternative. You can, after all, always pay one half of the poor to kill the other half. Persian Gulf states have done this quite well, keeping traditional tribal structures intact and enriching their top leaders in exchange for support.

That worse alternative will be populism, trying to attract as wide of swathes of your population as can do by promising them all kinds of impossible things. You’ll have to draw on uneducated, untrained bits of your people for administration because doing this will probably piss off your elite, who will want nothing to do with you (and probably will conspire to get rid of you). If you go for the race or religion card, anybody not part of that said group will want to bolt early on. Both Nigeria and the Congo’s first leaders learned this the hard way with the Biafra and Katanga secessions respectively.

By either buying off the right people, or killing off the the wrong ones, you’ll eventually get your system of government accepted in most places. Even the United States’s Federal government had to fight a civil war (and several Indian ones) to get its writ accepted in the places it called its own.

Problem number 3: Jobs, jobs, jobs

Your colonizer left you with a wholly alien form of political organization – a nation-state. Had they pulled up stakes and let you return to your pre-colonial political system – whether that be a tribal village, a slave-sacrificing empire, or an agricultural common market – you’d be able to say piss off to modern technology as well as the modern world in general. But nation-states require proper education, infrastructure, military and police forces, and legal systems to run. You’re not about to vote yourself out of a job by letting go of the political system that’s put you in charge in return for some mythologized pre-colonial past.

To do all this you need a proper economy. Worse, all your neighbors are doing the same in a race for power. You can’t sit back and expect them to not interfere with your nation if you get too weak. So you get to work.

You might have the resource curse, which will seem really great at first because it’ll let you buy all kinds of stupid things with minimal effort. But it’ll rot your human capital and make you only appear to be modern. You might even swamp yourself with foreigners come to run your country while your native peoples seclude and anesthetize themselves with newer and newer toys.

Or you’ll have to find some way to trade up into a developed economy. Some kind of local resource will have to do; maybe your former overlords set up a few industries here and there, but none of them will be big enough to run your country just yet. You’ll have to focus heavily on the handful of things that made your country attractive as a colony to begin with.

South Africa was arguably one of Africa’s most advanced nations when it was decolonized, but even today a large proportion of its national income is derived from its gold and diamond mines, which have been used to invest and improve its economy. Other nations, like Ghana, focused on their colonial-era exports (coffee specifically). Over time, you might, like the United States, trade up into a modern economy using these commodities. Or, if you keep changing your mind about what you want to export or try to develop too fast, you’ll end up like Ghana, which was one of West Africa’s best colonies until its government ran its advantages into the ground.

Problem number 4: Who the hell are you?

Once you’ve at least got a start on your first three problems, you need to start building a common identity among your peoples. The likelihood your people are all one culture, language, and religion are low. Even if they are, the tendency of colonial systems is to allow segments of society to atrophy and others to prosper as part of their ruling strategy, and so some kind of divide has come about by now (such as America’s differences in its 13 original colonies).

The best choice here is to work your way towards a new, common culture that draws from threads around the country. The odds are good your initial support base that you’re using to build up your nation have some stuff in common, and their traits can become the “essence” of your “timeless” people. You can just make shit up too; why else do you think Americans spell ‘neighbor’ differently?

But you may not have that option. You might have a diverse group of peoples who historically don’t get along, and who the colonizers used against one another in order to keep the countryside divided. You might skillfully buy off key members while stalling the bigots within your own ranks – something few countries have ever managed. More likely, you’ll double down on the prejudice card, riling up your supporters against their perceived enemies – just like the colonialists did – to subdue your foes. This won’t always work so well; Africa is full of civil wars that came about because of this strategy, but under the circumstances few African leaders had much choice minus allowing those bits of their countries to split off and form new ones.

You’ll want to rally people around national symbols, mythologized leaders, distorted histories, and other feel-good bullshit which will make people believe that their particular nation is unique and worthwhile and not just another set of human beings organized by an elite for that elite’s enrichment. If you can play the Messiah card, go for it! Just be prepared for the irony if you’re overthrown.

Problem number 5: After you, what?

Now comes the final, most tricky part. You’ve got the building blocks of a nation going. But you’ve got to write some kind of social contract that works between your government and your people. Fat good all this will do when you’re dead and everything comes apart because you were the linchpin holding the thing together.

You don’t have to be nice. You can set up a one-party state that will turn you into a god and that will shoot, torture, and terrorize its way to stability for years to come. You can turn your little nation into a monarchy and pass power on to your son. This option works best for placating your elites, who will then clearly know who can and can’t be king. But it won’t thrill your poor.

You can try democracy too, but if you’ve done a bad job building a nation that’s just going to descend into factionalism, corrupt parliaments, and probably a civil war or two. Remember that a democratic system imposed on peoples who are not a unified nation will result in immediate regionalism and other antagonisms coming right up front, since they’re suddenly allowed to express how different they are and how much they hate the other ethnic or religious groups within your country’s borders. Iraq’s a fine example of this, but so too are the Caucasian republics, all of whom were ill-suited to be decolonized so suddenly by the Soviet Union.

‘Cuz pimpin’ ain’t easy but it’s necessary

You can opt for some kind of third way to avoid all this, but you’ll fail. Nobody’s ever found a way to avoid these problems following decolonization. Fail to secure the borders and your nation will probably stop existing. Don’t sort your internal security and your best case scenario is mayor of your capital city (and worst case is being hanged in the city square). Fuck up the economy and you won’t be able to afford to do either of the first two (and might get yourself booted as well). Fail to build a common national identity and you’d better buy up your country’s marshmallow supply to roast on the inevitable civil strife’s widespread fires. And if you can’t figure out how to make it all last after you, well, what’s the point?

Good luck! Have fun! And remember, if you fail, you and your whole family will probably be executed.