diff --git a/src/apispec/ext/marshmallow/common.py b/src/apispec/ext/marshmallow/common.py
index 9f773a8..7f757f1 100644
--- a/src/apispec/ext/marshmallow/common.py
+++ b/src/apispec/ext/marshmallow/common.py
@@ -43,14 +43,12 @@ def get_fields(schema, *, exclude_dump_only=False):
     :param bool exclude_dump_only: whether to filter fields in Meta.dump_only
     :rtype: dict, of field name field object pairs
     """
-    if hasattr(schema, "fields"):
+    if isinstance(schema, marshmallow.Schema):
         fields = schema.fields
-    elif hasattr(schema, "_declared_fields"):
+    elif isinstance(schema, type) and issubclass(schema, marshmallow.Schema):
         fields = copy.deepcopy(schema._declared_fields)
     else:
-        raise ValueError(
-            f"{schema!r} doesn't have either `fields` or `_declared_fields`."
-        )
+        raise ValueError(f"{schema!r} is neither a Schema class nor a Schema instance.")
     Meta = getattr(schema, "Meta", None)
     warn_if_fields_defined_in_meta(fields, Meta)
     return filter_excluded_fields(fields, Meta, exclude_dump_only=exclude_dump_only)

diff --git a/tests/test_ext_marshmallow_common.py b/tests/test_ext_marshmallow_common.py
index 8b1f192..5ce03d1 100644
--- a/tests/test_ext_marshmallow_common.py
+++ b/tests/test_ext_marshmallow_common.py
@@ -79,3 +79,12 @@ class TestGetFields:
         assert list(get_fields(ExcludeSchema, exclude_dump_only=True).keys()) == [
             "field5"
         ]
+
+    # regression test for https://github.com/marshmallow-code/apispec/issues/673
+    def test_schema_with_field_named_fields(self):
+        class TestSchema(Schema):
+            fields = fields.Int()
+
+        schema_fields = get_fields(TestSchema)
+        assert list(schema_fields.keys()) == ["fields"]
+        assert isinstance(schema_fields["fields"], fields.Int)
diff --git a/tests/test_ext_marshmallow_openapi.py b/tests/test_ext_marshmallow_openapi.py
index 7e27845..121401c 100644
--- a/tests/test_ext_marshmallow_openapi.py
+++ b/tests/test_ext_marshmallow_openapi.py
@@ -200,9 +200,7 @@ class TestMarshmallowSchemaToModelDefinition:
             pass
 
         expected_error = (
-            "{!r} doesn't have either `fields` or `_declared_fields`.".format(
-                NotASchema
-            )
+            f"{NotASchema!r} is neither a Schema class nor a Schema instance."
         )
         with pytest.raises(ValueError, match=expected_error):
             openapi.schema2jsonschema(NotASchema)
@@ -346,7 +344,7 @@ class TestMarshmallowSchemaToParameters:
             pass
 
         expected_error = (
-            f"{NotASchema!r} doesn't have either `fields` or `_declared_fields`"
+            f"{NotASchema!r} is neither a Schema class nor a Schema instance."
         )
         with pytest.raises(ValueError, match=expected_error):
             openapi.schema2jsonschema(NotASchema)

Marshmallow 3.12 schema with `fields` property produce error
Marshmallow added Fields be accessed by name as Schema attributes 

I have a schema like this 

```python
import marshmallow as ma

class Schema(ma.Schema):
    fields = ma.fields.List(ma.fields.Int)
```

Produces error 

```
 File "/venv/lib/python3.9/site-packages/apispec/ext/marshmallow/openapi.py", line 127, in schema2parameters
    fields = get_fields(schema, exclude_dump_only=True)
  File "/venv/lib/python3.9/site-packages/apispec/ext/marshmallow/common.py", line 56, in get_fields
    return filter_excluded_fields(fields, Meta, exclude_dump_only=exclude_dump_only)
  File "/venv/lib/python3.9/site-packages/apispec/ext/marshmallow/common.py", line 90, in filter_excluded_fields
    for key, value in fields.items()
AttributeError: 'List' object has no attribute 'items'
```

https://marshmallow.readthedocs.io/en/stable/changelog.html#id2

`get_fields` function gets `fields` schema attribute:
https://github.com/marshmallow-code/apispec/blob/dev/src/apispec/ext/marshmallow/common.py#L46


Can we eliminate this?





tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_raises_error_if_no_declared_fields[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_raises_error_if_no_declared_fields[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_raises_error_if_not_a_schema[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_raises_error_if_not_a_schema[3.0.0]
tests/test_ext_marshmallow_common.py::TestMakeSchemaKey::test_raise_if_schema_class_passed tests/test_ext_marshmallow_common.py::TestMakeSchemaKey::test_same_schemas_instances_equal tests/test_ext_marshmallow_common.py::TestMakeSchemaKey::test_same_schemas_instances_unhashable_modifiers_equal[list] tests/test_ext_marshmallow_common.py::TestMakeSchemaKey::test_same_schemas_instances_unhashable_modifiers_equal[set] tests/test_ext_marshmallow_common.py::TestMakeSchemaKey::test_different_schemas_not_equal tests/test_ext_marshmallow_common.py::TestMakeSchemaKey::test_instances_with_different_modifiers_not_equal tests/test_ext_marshmallow_common.py::TestUniqueName::test_unique_name[2.0] tests/test_ext_marshmallow_common.py::TestUniqueName::test_unique_name[3.0.0] tests/test_ext_marshmallow_common.py::TestGetFields::test_get_fields_meta_exclude_dump_only_as_list_and_tuple[tuple-tuple] tests/test_ext_marshmallow_common.py::TestGetFields::test_get_fields_meta_exclude_dump_only_as_list_and_tuple[tuple-list] tests/test_ext_marshmallow_common.py::TestGetFields::test_get_fields_meta_exclude_dump_only_as_list_and_tuple[list-tuple] tests/test_ext_marshmallow_common.py::TestGetFields::test_get_fields_meta_exclude_dump_only_as_list_and_tuple[list-list] tests/test_ext_marshmallow_common.py::TestGetFields::test_schema_with_field_named_fields tests/test_ext_marshmallow_openapi.py::TestMarshmallowFieldToOpenAPI::test_fields_with_missing_load[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowFieldToOpenAPI::test_fields_with_missing_load[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowFieldToOpenAPI::test_fields_default_location_mapping_if_schema_many[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowFieldToOpenAPI::test_fields_with_dump_only[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowFieldToOpenAPI::test_fields_with_dump_only[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_schema2jsonschema_with_explicit_fields[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_schema2jsonschema_with_explicit_fields[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_schema2jsonschema_override_name[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_schema2jsonschema_override_name[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_required_fields[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_required_fields[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_partial[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_partial[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_no_required_fields[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_no_required_fields[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_title_and_description_may_be_added[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_title_and_description_may_be_added[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_excluded_fields[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_excluded_fields[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_unknown_values_disallow[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_unknown_values_disallow[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_unknown_values_allow[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_unknown_values_allow[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_unknown_values_ignore[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_unknown_values_ignore[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_only_explicitly_declared_fields_are_translated[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_only_explicitly_declared_fields_are_translated[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_observed_field_name_for_required_field[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_observed_field_name_for_required_field[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_schema_instance_inspection[2.0-True] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_schema_instance_inspection[2.0-False] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_schema_instance_inspection[3.0.0-True] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToModelDefinition::test_schema_instance_inspection[3.0.0-False] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_field_multiple[2.0-List] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_field_multiple[2.0-CustomList] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_field_multiple[3.0.0-List] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_field_multiple[3.0.0-CustomList] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_field_required[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_field_required[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_partial[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_partial[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_partial_list[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_partial_list[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_body[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_body_with_dump_only[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_body_many[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_query[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_query[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_query_instance[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_query_instance[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_query_instance_many_should_raise_exception[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_schema_query_instance_many_should_raise_exception[3.0.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_fields_query[2.0] tests/test_ext_marshmallow_openapi.py::TestMarshmallowSchemaToParameters::test_fields_query[3.0.0] tests/test_ext_marshmallow_openapi.py::TestNesting::test_schema2jsonschema_with_nested_fields[2.0] tests/test_ext_marshmallow_openapi.py::TestNesting::test_schema2jsonschema_with_nested_fields[3.0.0] tests/test_ext_marshmallow_openapi.py::TestNesting::test_schema2jsonschema_with_nested_fields_only_exclude[2.0-only] tests/test_ext_marshmallow_openapi.py::TestNesting::test_schema2jsonschema_with_nested_fields_only_exclude[2.0-exclude] tests/test_ext_marshmallow_openapi.py::TestNesting::test_schema2jsonschema_with_nested_fields_only_exclude[3.0.0-only] tests/test_ext_marshmallow_openapi.py::TestNesting::test_schema2jsonschema_with_nested_fields_only_exclude[3.0.0-exclude] tests/test_ext_marshmallow_openapi.py::TestNesting::test_schema2jsonschema_with_nested_fields_with_adhoc_changes[2.0] tests/test_ext_marshmallow_openapi.py::TestNesting::test_schema2jsonschema_with_nested_fields_with_adhoc_changes[3.0.0] tests/test_ext_marshmallow_openapi.py::TestNesting::test_schema2jsonschema_with_nested_excluded_fields[2.0] tests/test_ext_marshmallow_openapi.py::TestNesting::test_schema2jsonschema_with_nested_excluded_fields[3.0.0] tests/test_ext_marshmallow_openapi.py::test_openapi_tools_validate_v2 tests/test_ext_marshmallow_openapi.py::test_openapi_tools_validate_v3 tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[2.0-range-properties0] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[2.0-range_no_upper-properties1] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[2.0-multiple_ranges-properties2] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[2.0-list_length-properties3] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[2.0-custom_list_length-properties4] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[2.0-string_length-properties5] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[2.0-custom_field_length-properties6] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[2.0-multiple_lengths-properties7] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[2.0-equal_length-properties8] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[2.0-date_range-properties9] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[3.0.0-range-properties0] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[3.0.0-range_no_upper-properties1] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[3.0.0-multiple_ranges-properties2] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[3.0.0-list_length-properties3] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[3.0.0-custom_list_length-properties4] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[3.0.0-string_length-properties5] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[3.0.0-custom_field_length-properties6] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[3.0.0-multiple_lengths-properties7] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[3.0.0-equal_length-properties8] tests/test_ext_marshmallow_openapi.py::TestFieldValidation::test_properties[3.0.0-date_range-properties9]