At this moment in mid-August, 1.5 million people from dozens of countries around the world are in Mecca, Saudi Arabia, to perform the hajj, the Islamic religious pilgrimage.

It’s a huge event — in terms of both its significance in Islam and the massive logistical challenge of having that many people from all walks of life and every corner of the globe descend on one relatively small place all at once.

But what actually goes on at the hajj? What is its religious and political significance? How do they handle all those people? And what is inside that big black box?

We've got you covered: Here are the most basic answers to the most basic questions about the hajj.

What is the hajj?

The hajj — Arabic for “pilgrimage” — is a five-day religious pilgrimage to Mecca and nearby holy sites in Saudi Arabia that all Muslims who are physically and financially able must perform at least once in their lives. It is one of the five pillars, or duties, of Islam, along with the profession of faith in the one God and Mohammed as his prophet, prayer, charitable giving, and fasting during the holy month of Ramadan.

The hajj takes place only once a year, in the 12th and final month of the Islamic lunar calendar; pilgrimages to Mecca made at other times in the year are encouraged but do not count as the hajj. Because the Islamic lunar calendar is about 11 days shorter than the 365 days of the standard Gregorian calendar, the timing of the hajj moves backward each year.

Over the five days of the hajj, pilgrims perform a series of rituals meant to symbolize their unity with other believers and to pay tribute to God. On the last three days of the hajj, pilgrims — as well as all other Muslims around the world — celebrate Eid al-Adha, or the Festival of Sacrifice. This is one of the two major religious holidays Muslims celebrate every year. (The other is Eid al-Fitr, which comes at the end of Ramadan.)

At the end of the hajj, pilgrims return home and are often given the honorific “hajji,” meaning one who has performed the hajj. (One interesting note here: During the Iraq War, US troops frequently used the term “hajji” as a derogatory term for any Iraqi, Arab, or other person of Middle Eastern or South Asian descent. So although they certainly didn’t mean it this way, and it almost certainly wasn’t taken this way by the person on the receiving end of the slur, US troops were inadvertently applying a term of respect and honor to these individuals.)

What is the religious significance of the hajj?

People may be surprised to learn that the hajj has very little to do with the Prophet Mohammed. Rather, it mostly commemorates events in the life of the Prophet Ibrahim — that is, Abraham. Yes, that Abraham.

If you’re from a non-Abrahamic faith tradition or if it’s just been a while since Sunday school, Abraham is a venerated patriarchal figure in Judaism, Christianity, Islam, and the Baha’i faith. He is perhaps best known for being willing to personally kill his beloved son when God commanded him to do so. At the last minute, so the story goes, God stepped in and told Abraham to sacrifice an animal instead, rewarding Abraham’s unwavering faith.

In the Judeo-Christian narrative, the son Abraham almost sacrifices is Isaac. In Islam, however, it’s Abraham’s other son, Ismail (Ishmael), who is almost sacrificed. Muslims consider both Abraham and Ismail to be prophets of God, and Mohammed’s ancestry is said to be traced back to Ismail.

There is another event involving Ismail and his mother, Hagar, that looms large in the hajj. The story goes like this: God commanded Abraham, as a test of faith, to take Hagar and the infant Ismail out to a barren desert area located between the two hills of Safa and Marwah in Mecca, and leave them there alone with only basic provisions. Eventually the water ran out, and the increasingly frantic Hagar ran back and forth from hill to hill seven times searching for water for her parched child.

Then a miracle occurred: A well, later called the Zamzam well, sprang from the ground, saving both of them. The story of how the well was discovered differs: Some accounts say it was the baby Ismail’s distressed kicking of his feet that scratched away the dirt and revealed the water source. Other accounts hold that the angel Gabriel (Jibril in Arabic) tipped his wing into the dirt to reveal the well.

Abraham and Ismail later went on to build the Kaaba, the black cuboid structure in Mecca that Muslims face when they pray, together, as a place of worship of the one God. (Abraham eventually came back and retrieved his family from the desert, evidently.)

Soon after they built the Kaaba, tradition holds, God commanded Abraham to proclaim a pilgrimage to the site — in other words, the hajj — to all mankind (well, all monotheists) so that they can come together in one place to show their devotion to God.

Okay, seriously, what’s the deal with the big black cube?

Muslims around the world face the direction of the Kaaba — Arabic for “cube” — when they pray, but they don’t worship the Kaaba (or the Black Stone). Rather, it is a place of worship of the one God. It is also a focusing mechanism, a central point on the globe toward which all Muslims, in a symbol of unity, direct their thoughts and prayers to God.

According to Islamic tradition, the site of the Kaaba was originally a sacred place where angels would worship God in the days before man was created. Later, Adam (yes, that Adam, partner to Eve) built a shrine to God on that spot, but it too was destroyed by the ravages of time. When Abraham came along, he and his son Ismail rebuilt the Kaaba on the foundations of Adam’s earlier shrine as a place of worship of the one God.

The structure consists of four walls and a roof, all made from stone from the hills surrounding Mecca. The four corners roughly face the four points of the compass. The building is often referred to as a “cube” (that’s where “Kaaba” comes from, after all), but this is not technically correct. To be a true geometric cube, all its edges must have the same length, and every corner in the cube must have an angle of 90 degrees.

The Kaaba’s edges are not all the same length, so therefore it is best described as a “cuboid,” not a “cube.” It is covered by a black silk cloth decorated with verses of the Quran in gold-embroidered Arabic calligraphy. This cloth is known as the kiswah, and it is replaced yearly, on the second day of the hajj.

While Abraham was building the Kaaba, so the legend goes, the angel Gabriel came down and gave Abraham the famous Black Stone, which he placed in the eastern corner of the structure.

There is another squarish stone on the ground a few feet away from the Kaaba with what look like two footprints in it. This is known as the Station of Abraham and is said to be the stone where Abraham stood while watching over the construction of the Kaaba. Today it is encased in a beautifully ornate golden glass-and-metal structure.

There is a famous story in Islam about Mohammed and the Black Stone. By Mohammed’s time, the Kaaba had again been damaged and was being repaired (it has been damaged or destroyed and rebuilt or repaired numerous times over the centuries). The story goes that when construction was finished and it came time to place the Black Stone back in the eastern corner, the final step, the tribes of Mecca argued fiercely over who would get to do the honors.

They decided to ask the next man who walked by to decide for them, and that man happened to be Mohammed. His solution was to put the stone on a large cloth and have each of the leaders of the four tribes hold a corner of the cloth and carry the stone to its place. Mohammed himself then placed the stone into its final position.

This was back before Mohammed had received his first revelation from God. The next time Mohammed was involved with the Kaaba, though, would prove to be much less ... harmonious.

Islamic tradition holds that although Abraham built the Kaaba to worship the one God, over time the Kaaba had been more or less co-opted by the various pagan tribes in the area, all of whom had placed idols to their preferred deity inside the Kaaba, thereby “corrupting” it.

One particularly popular idol was a figure of Hubal, a moon deity worshipped by many in Mecca at the time. Access to the Kaaba (and thus the idol) was controlled by the powerful Quraysh tribe, of which Mohammed was a member, and they basically capitalized on this to get rich, charging fees and selling wares to pilgrims coming to worship the idol.

When Mohammed began receiving revelations from God (he received his first one about five years after the incident with the Black Stone) and preaching his message of monotheism, the rich Qurayshi merchants started getting a little antsy. Worried that the growing popularity of his decidedly anti-idol worshiping message could potentially hurt business, they ran Mohammed and his small band of followers out of town.

Ten years later, Mohammed and his now much larger and more powerful army of followers defeated the Quraysh tribe and took control of Mecca. One of Mohammed’s first acts upon taking control of the city was to go into the Kaaba and smash the idol of Hubal and the hundreds of other idols to pieces, rededicating the shrine as a place of worship of the one God.

Today, the Kaaba is kept closed during the hajj because of the overwhelming number of people, but those who visit the Kaaba during other times of the year are sometimes allowed to go inside. It’s quite beautiful: The walls are white marble on the lower half and green cloth on the upper half. There is very little inside it, though — just three tall stone pillars, a small table, some hanging lamp–looking things, and a staircase to the roof.

Oh, and aliens.

Just kidding.

What are the main rituals performed during the hajj?

The most well-known ritual is the tawaf (literally “circumambulation”), during which pilgrims circle the Kaaba counterclockwise seven times at both the very beginning and the very end of the hajj. Although it’s not entirely clear exactly why it’s seven specifically, many believe it has to do with the motion of celestial bodies. Seven is also a prominent number associated with the divine in many religions, including Christianity and Judaism.

Other rituals include a ceremony where pilgrims throw small pebbles at three large stone walls, called jamarat, to symbolize the stoning the devil that tempted Abraham to defy God, and the slaughtering of an animal (usually a sheep) to honor the animal Abraham slaughtered instead of his son.

The meat is then given to feed the poor and needy. These days, pilgrims frequently elect to purchase tokens to have an animal slaughtered for them.

There is also a ritual called Sa’ee, in which pilgrims walk back and forth between the two hills of Safa and Marwah seven times to commemorate Hagar’s frantic search for water for her infant son.

Today, both hills are enclosed within the Masjid al-Haram (Sacred Mosque) complex (which also houses the Kaaba), and the path between the hills is a long, beautiful indoor gallery with marble floors and air conditioning. Many also drink from the Zamzam well located there.

The only ritual that is solely related to Mohammed is the climbing of Mount Arafat, which is where Mohammed preached his last sermon. On the second day of hajj, pilgrims wake at dawn and walk a short distance to Mount Arafat, where they spend the remainder of the day on or near the mountain in quiet worship and contemplation of God.

Can non-Muslims do the hajj?

No. Although Christians and Jews believe in the God of Abraham, they are not allowed to perform the hajj. Indeed, the government of Saudi Arabia forbids all non-Muslims from entering the holy city of Mecca at all.

The Saudi government takes this very seriously, so the odds that a non-Muslim would be able to slip in unnoticed among the throngs of pilgrims undetected or pretend to be Muslim and get in that way are extremely small. It’s not completely impossible — it has happened a handful of times over the centuries — but given the millions who attend every single year, the rate of success is miniscule. The Saudis have been doing this for a long time, and they’re not idiots.

Legal entry into the country is extremely tightly controlled, and the paperwork required to get a hajj visa is incredibly detailed. Pilgrims must book their hajj trip through a Saudi government–approved hajj travel agent. For a Western Muslim convert to be allowed to go on hajj, he or she must present documentation from an imam (Muslim religious leader). The imam must testify in writing that he knows the person in question and that the person is a true convert.

Trying to come in on a regular tourist visa and then stealthily making your way to Mecca is also a nonstarter. Getting a tourist visa as a Westerner is notoriously hard, and the likelihood of you being able to just slip away from your Saudi government minder and travel undetected all the way from the capital Riyadh to Mecca — more than 500 miles away, on the other side of a vast desert — is basically laughable.

The only way for a non-Muslim to get in is essentially to play the long con, pretending to convert to Islam seemingly sincerely enough to convince the local imam that you’re for real. That has happened before: In 2015, WND published a three-part series written pseudonymously by someone who claimed to be a white British non-Muslim man who successfully fake-converted to Islam and went on hajj.

So it’s not impossible. But you have to really, really, really want to go to all that trouble and risk potentially being deported and banned from the country (not to mention causing a major international incident and pissing off just about every Muslim on the planet) just to get into a city to see some sites that aren’t even of religious significance to you.

What about women and children?

Parents may choose to bring even their very young children with them, but the hajj won’t “count” toward fulfilling the child’s personal religious obligation, as that requires the child to be mature enough intellectually and spiritually to understand the significance of the hajj.

Women are also allowed — indeed, required, just like every other physically and financially able Muslim is — to perform the hajj. However, they have to be accompanied by an appropriate male guardian (called a mahram). Here are the rules, per the US State Department:

Women below the age of 45 must be accompanied by a “mahram” (e.g. close adult, male relative such as a husband, son, father, or brother) for Hajj. Women must be met by their sponsor upon arrival. Women who are traveling alone and not met by sponsors have experienced delays before being allowed to enter the country or to continue on other flights. Women over 45 may travel without a mahram in an organized group, provided they submit a notarized letter of no objection from the husband, son, or brother, authorizing travel for Hajj with the named group. Violators face deportation.

Women who are members of the minority Shia sect of Islam (the majority of the world’s Muslims are Sunni), on the other hand, are not required by Saudi authorities to have a mahram when attending hajj and are allowed to travel alone. This is likely because Shia scholars have, unlike Sunni scholars, ruled that a woman may travel alone on hajj if she feels that she will be safe.

And since it’s basically impossible to talk about women in Islam these days without someone bringing up the issue of how much clothing they’re required (or not required) to wear, here’s a fun fact: Although women must cover their hair with a scarf, the face veil, known as a niqab, and the burqa, the garment that covers from head to toe with only a mesh-like panel through which to see, are not allowed during hajj.

Yes, you read that right: The two pieces of clothing that are the most controversial and are seen by many anti-Islam critics as symbols of the pervasive and pernicious cultural intrusion of Islam and its inherent oppression of women, are not allowed during one of Islam’s most sacred rituals, even though men and women mix freely during it.

Some women still wear them, though, despite the prohibition, and it doesn’t seem to be something that’s actually enforced. Some have also come up with rather creative workarounds, such as wearing large, darkly tinted sunglasses and those paper face masks doctors wear.

So why the prohibition? The reason is basically that while Mohammed’s various statements regarding women’s dress are hotly debated among Muslim scholars (Mohammed lived a long time, after all, and he said a lot of things over the course of his life), his statement on women not covering their faces (or hands) during hajj is crystal clear: A woman in the state of ritual purity for hajj “should not cover her face or wear gloves.” Not a whole lot of room for debate there (though, of course, people still do debate it, because humans).

Men also wear special clothing during hajj. Male pilgrims wear two pieces of clean, unstitched cloth (usually plain white) — one wrapped around their waist and one wrapped around their torso — and plain sandals. The purpose of making all men dress in this same simple garb is to strip away all indications of wealth and status so that all pilgrims are seen as equal, as they are in the eyes of God.

How in the world does Saudi Arabia handle such a massive number of people each year?

In general, the Saudi government does a pretty good job at managing things, all things considered. But not always: Over the years, there have been many horrific examples of large numbers of people dying.

1.5 million people are attending the hajj this year. That’s way bigger than the Olympics (10,500 athletes and 500,000 foreign tourists went to Rio for the 2016 Olympics), Burning Man (the annual gathering in the Nevada desert currently has an attendance cap of 70,000), and the average Taylor Swift concert combined.

It’s not the biggest world event — that honor probably goes to the Kumbh Mela Hindu religious festival held every three years in India (in 2013, some 100 million people are believed to have attended) — but it’s still pretty impressive. For instance, the Saudi government’s target for the number of people performing tawaf (circling the Kaaba seven times) last year was 107,000 an hour.

But considering there are an estimated 1.6 billion Muslims on the planet, all of whom are required to perform the hajj at least once in their lives if they are financially and physically able, the numbers could actually be a lot higher. The main reason they aren’t is because every year the Saudi government sets quotas for each country on how many pilgrims they’re allowed to send on hajj.

To manage the people who do get to come, the Saudi government has invested billions of dollars in building a vast and elaborate infrastructure in and around the holy sitesa massive hajj terminal at the main airport in Riyadh, a complex network of roads to bring pilgrims to the city of Mecca, wide foot bridges to carry the tens of thousands of pedestrians who move from place to place at preset, staggered times to minimize traffic flow (personal vehicles are prohibited, for obvious reasons, so most people walk everywhere, though some — mostly the elderly — take shuttle buses), multi-tiered galleries around the Kaaba and the jamarat (the stone walls where the symbolic stoning of the devil takes place), and more.

Perhaps the most stunning logistical feat, though, is the vast tent city at Mina, located just a few kilometers from Mecca, where more than 160,000 air-conditioned, fireproof, Teflon-coated fiberglass tents provide temporary accommodation for pilgrims. Men and women, even married couples, sleep in separate tents. The majority of the tents can accommodate about 50 people, and the average price for each pilgrim is $500, according to Al Jazeera’s Basma Atassi.

However, luxury tents costing as much as $10,000 per pilgrim — including some equipped with jacuzzis — are available for those few wealthy enough to afford them. As Atassi writes, though, the Saudi government in recent years has taken steps to ban them, stating that they “defied the spirit of the Hajj.”

For 51 weeks of the year, the tent city, roads, and other infrastructure built to accommodate pilgrims are almost completely deserted. Then for one week each year, they seethe with humanity.

There is also an extensive security apparatus in place to monitor every aspect of the hajj — to maintain order and safety, but also to ensure that proper Islamic protocol is followed by all in attendance. This year, the Saudis have deployed tens of thousands of security forces to control crowds and help keep pilgrims safe.

Unfortunately, that same number of security forces wasn’t enough to prevent catastrophe from striking in 2015: That year, more than 2,400 people were killed when a stampede occurred at the intersection of two pedestrian walkways leading out of the tent city toward the jamarat bridge.

Though this was the deadliest hajj disaster in history, other disasters have occurred. As Al Jazeera’s Atassi notes:

A 1990 stampede inside a pedestrian tunnel killed almost 1,500 people, while stampedes in the stoning of the devil area in 1990, 1994, 1998, 2003, 2004 and 2006 claimed the lives of hundreds. The eruption of a fire in 1997 burned thousands of tents and killed over 300 people.

Health issues are also a major concern during the hajj. So many people from all corners of the globe gathering in such a small area means the chances of contagious diseases spreading through the population are very high. There is also a high risk of heat stroke, heat exhaustion, dehydration, and sunburn, especially when the hajj falls in the summer months (as it does this year). For instance, in August 1985, 2,000 cases of heatstroke were reported, and more than 1,000 of the sufferers died within a few days.

To try to prevent this from happening, the Saudi government makes all pilgrims adhere to strict guidelines regarding vaccinations, especially for particularly contagious diseases such as meningitis. Pilgrims are also advised to drink lots of water and to be mindful of the perils of the blistering desert heat.

The Saudi government also provides complimentary water distributed from refrigerated trucks, air-conditioned tents at Mina, large sun-blocking canopies, and thousands of fine-mist sprinklers, according to the US Centers for Disease Control and Prevention.

Medical facilities are also available in and around the main hajj sites. As Asaad Shujaa and Sameer Alhamid write in the Turkish Journal of Emergency Medicine, in 2012 there were 25 hospitals with 4,427 bed capacity (500 critical care and 550 emergency care) and 141 health centers with 20,000 qualified specialized personnel. They also note that all health care is provided at no cost to all pilgrims.

And, finally, there’s the politics.

Saudi Arabia and Iran have for years been in a sort of proxy struggle for dominance of the Middle East and the broader Muslim world. Saudi Arabia's government is officially Sunni, and Iran's is officially Shia. Both countries frequently exploit this by pushing a sectarian worldview of Sunni versus Shia. And that often comes to a head over the hajj.

The political legitimacy of the Saudi royal family rests largely on its religious credentials, which it gets at home from the support of the country's ultra-conservative Wahhabi religious establishment, and internationally from being the "custodian" of the two holiest places in Islam, the Prophet Mohammed's mosque in Medina and Masjid al-Haram in Mecca.

Iran, then, has long sought to portray the Saudis as incompetent custodians in an effort to damage their credibility, and has even called for an international body to take over administration of these places. When a horrific stampede occurred at the 2015 hajj, Iran jumped at the chance to blame the Saudis.

More than 400 Iranian pilgrims were reportedly killed in the incident. But before most of the victims had even been identified, Iranian leaders issued statements blaming the Saudis for the accident.

Iran’s Supreme Leader Ayatollah Khamenei stated, “The Saudi government is obliged to accept its heavy responsibility in this bitter incident and meet its obligations in compliance with the rule of righteousness and fairness; mismanagement and improper measures that were behind this tragedy should not be undermined,” and declared three days of mourning for the victims of the stampede.

The fight bled into the 2016 hajj. Khamenei issued a blistering statement on his website calling the Saudis murderers for their handling of the stampede last year and suggesting they may even have caused the stampede on purpose:

Saudi rulers were at fault in both cases. This is what all those present, observers and technical analysts agree upon. Some experts maintain that the events were premeditated. The hesitation and failure to rescue the half-dead and injured people, whose enthusiastic souls and enthralled hearts were accompanying their praying tongues on Eid ul-Adha, is also obvious and incontrovertible. The heartless and murderous Saudis locked up the injured with the dead in containers- instead of providing medical treatment and helping them or at least quenching their thirst. They murdered them.

Not to be outdone, Saudi Arabia’s top religious leader struck back, accusing the Iranians of being pagan fire worshipers, not Muslims. From Al Jazeera:

In comments to the Makkah newspaper published on Tuesday, Saudi Arabia's Grand Mufti Abdulaziz Al Sheikh was quoted as saying that Khamenei's remarks blaming Riyadh for last year's tragedy were "not surprising" because Iranians are descendants of Magi. Magi refers to Zoroastrians and those who worship fire. Predating Christianity and Islam, Zoroastrianism was the dominant religion in Persia before the Arab conquest. "We must understand they are not Muslims, for they are the descendants of Majuws, and their enmity towards Muslims, especially the Sunnis, is very old," Saudi's grand mufti said, according to the AP news agency.

The Iranians also decided to bar their citizens from attending the hajj at all last year, claiming the Saudis failed to adequately guarantee the safety of Iranian pilgrims and accusing them of having “blocked the proud and faithful Iranian pilgrims’ path to the Beloved’s House [the Kaaba].” The Saudis, of course, blamed the Iranians, arguing they had refused to sign the agreement both sides had reached over the 2016 hajj:

“Saudi Arabia does not prevent anyone from performing the religious duty,” the Saudi foreign minister, Adel al-Jubeir, said at a news conference with his visiting British counterpart, Philip Hammond. “Iran refused to sign the memorandum and was practically demanding the right to hold demonstrations and to have other advantages … that would create chaos during hajj, which is not acceptable,” he added.

Whoever’s fault it was, no Iranian pilgrims were allowed at the hajj in 2016. In 2017, however, Iran lifted the ban, and around 80,000 Iranians performed the hajj that year.

And there are tons of Shia Muslims from other countries, too. For the most part, Sunni and Shia pilgrims on hajj get along just fine — despite the best efforts of the governments of Iran and Saudi Arabia to stir up sectarian tension every year for geopolitical gain.

That Sunni and Shia pilgrims come together as brothers and sisters in Islam during the hajj is a powerful reminder of how religion can unite people as well as divide them. Pilgrims planning to go on hajj are advised to avoid conflict and disagreement with other Muslims, to refrain from judging or being harsh toward others whose customs or interpretations of Islam may seem ignorant or incorrect.

Because that’s what the hajj is really supposed to be about: believers from around the world coming together, putting aside linguistic, cultural, class, and sectarian differences, and worshiping God.