diff --git a/Cython/Utility/MemoryView_C.c b/Cython/Utility/MemoryView_C.c
index e3b82a87831f6a2bd4064bedebc7a96238d03a53_Q3l0aG9uL1V0aWxpdHkvTWVtb3J5Vmlld19DLmM=..b2c32be61bd5dd33db31377779bb17725d843630_Q3l0aG9uL1V0aWxpdHkvTWVtb3J5Vmlld19DLmM= 100644
--- a/Cython/Utility/MemoryView_C.c
+++ b/Cython/Utility/MemoryView_C.c
@@ -347,11 +347,19 @@
     }
 
     /* Check axes */
-    for (i = 0; i < ndim; i++) {
-        spec = axes_specs[i];
-        if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
-            goto fail;
-        if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
+    if (buf->len > 0) {
+        // 0-sized arrays do not undergo these checks since their strides are
+        // irrelevant and they are always both C- and F-contiguous.
+        for (i = 0; i < ndim; i++) {
+            spec = axes_specs[i];
+            if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
+                goto fail;
+            if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
+                goto fail;
+        }
+
+        /* Check contiguity */
+        if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
             goto fail;
     }
 
@@ -355,10 +363,6 @@
             goto fail;
     }
 
-    /* Check contiguity */
-    if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
-        goto fail;
-
     /* Initialize */
     if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
                                          new_memview != NULL) == -1)) {
diff --git a/tests/memoryview/relaxed_strides.pyx b/tests/memoryview/relaxed_strides.pyx
index e3b82a87831f6a2bd4064bedebc7a96238d03a53_dGVzdHMvbWVtb3J5dmlldy9yZWxheGVkX3N0cmlkZXMucHl4..b2c32be61bd5dd33db31377779bb17725d843630_dGVzdHMvbWVtb3J5dmlldy9yZWxheGVkX3N0cmlkZXMucHl4 100644
--- a/tests/memoryview/relaxed_strides.pyx
+++ b/tests/memoryview/relaxed_strides.pyx
@@ -62,3 +62,25 @@
     """
     cdef double[::1] a = array
     return a
+
+def test_zero_sized_multidim_ccontig(array):
+    """
+    >>> contig = np.ascontiguousarray(np.zeros((4,4,4))[::2, 2:2, ::2])
+    >>> _ = test_zero_sized_multidim_ccontig(contig)
+
+    >>> a = np.zeros((4,4,4))[::2, 2:2, ::2]
+    >>> if NUMPY_HAS_RELAXED_STRIDES: _ = test_zero_sized_multidim_ccontig(a)
+    """
+    cdef double[:, :, ::1] a = array
+    return a
+
+def test_zero_sized_multidim_fcontig(array):
+    """
+    >>> contig = np.ascontiguousarray(np.zeros((4,4,4))[::2, 2:2, ::2])
+    >>> _ = test_zero_sized_multidim_fcontig(contig)
+
+    >>> a = np.zeros((4,4,4))[::2, 2:2, ::2]
+    >>> if NUMPY_HAS_RELAXED_STRIDES: _ = test_zero_sized_multidim_fcontig(a)
+    """
+    cdef double[::1, :, :] a = array
+    return a